Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#26875 closed defect (bug) (fixed)

tinymce compat3x plugin adds tooltip en.undefined

Reported by: senlin's profile senlin Owned by:
Milestone: 3.9 Priority: normal
Severity: normal Version: 3.9
Component: TinyMCE Keywords:
Focuses: Cc:

Description

As TinyMCE 4.x is in core now the compat3x plugin ensures compatibility. 4.x however uses tooltips and according to Andrew Ozz "This seems caused by the compat3x plugin".

Change History (15)

#1 @azaozz
11 years ago

  • Milestone changed from Awaiting Review to 3.9

#2 @azaozz
11 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in [26994]:

TinyMCE: fix error trying to translate non-existent button "title" in the compat3x plugin. See #24067.

#3 @needle
11 years ago

Is it intentional that this fix prepends the language code to the tooltip text? One of my buttons now has a tooltip that reads "en.My Tooltip Text".

#4 @TobiasBg
11 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened
  • Version set to trunk

I'm seeing the same issue that @needle describes, with this initialization code for a TinyMCE toolbar button: https://plugins.trac.wordpress.org/browser/tablepress/trunk/admin/js/tinymce-button.js#L26

#5 @senlin
11 years ago

As opposed to what @needle and @TobiasBg describe, I can confirm that the issue that I reported has been solved with the latest update.

#6 follow-up: @needle
11 years ago

@senlin, it would be great if you would share the code for creating your button.

#7 @azaozz
11 years ago

[26994] is specifically for the problem reported in this ticket by @senlin. It removes the undefined part.

The en. part is another bug and probably warrants new ticket, but since it is in the same bit of code, can reuse this one :)

#8 @azaozz
11 years ago

In 27030:

TinyMCE: fix the compat3x plugin appending 'en.' to button titles. Set charset to UTF-8 in html_entity_decode() for translated strings. See #24067, see #26875.

#9 in reply to: ↑ 6 @senlin
11 years ago

Replying to needle:

@senlin, it would be great if you would share the code for creating your button.

You can find all details in the link of the original ticket: http://make.wordpress.org/core/2014/01/18/tinymce-4-0-is-in-core/#comment-12520

#10 follow-up: @needle
11 years ago

@azaozz, [27030] causes my button not to appear at all :(

I have a site with revision 26906 that fails to show the button, while another on 26905 shows it, albeit with the en. prefix

Edit: code here on GitHub, if that helps.

Last edited 11 years ago by needle (previous) (diff)

#11 in reply to: ↑ 10 ; follow-up: @azaozz
11 years ago

Replying to needle:

@azaozz, [27030] causes my button not to appear at all :(

That should work... Maybe refresh browser cache? Any JS errors?

#12 in reply to: ↑ 11 @needle
11 years ago

Replying to azaozz:

Replying to needle:

@azaozz, [27030] causes my button not to appear at all :(

That should work... Maybe refresh browser cache? Any JS errors?

Visited in clean browser - nope, no JS errors, no button either.

Last edited 11 years ago by needle (previous) (diff)

#13 @azaozz
11 years ago

Visited in clean browser - nope, no JS errors.

That's strange. Don't see anything in [26906] that can affect this. [26994] and [27030] affect only button titles/tooltips. even without a title arg, a button is still displayed. This works for me:

ed.addButton('commentblock', {
//	title : 'Insert a Comment Block',
	image : url+'/commentblock.jpg',
	cmd : 'COMMENTPRESS_CommentBlock'
});

Maybe add some debugging and see if the plugin is loading properly?

#14 @needle
11 years ago

Sorry, my bad - just noticed a schoolboy error on my part. Button appears now, with correct tooltip text. Many thanks @azaozz and sorry for the confusion!

#15 @azaozz
11 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

No problems :)

This should be fixed then.

Note: See TracTickets for help on using tickets.