[wp-trac] [WordPress Trac] #15102: tinymce language texts not loaded on page edit

WordPress Trac wp-trac at lists.automattic.com
Wed Oct 20 19:59:45 UTC 2010


#15102: tinymce language texts not loaded on page edit
--------------------------+-------------------------------------------------
 Reporter:  nb000         |       Owner:                   
     Type:  defect (bug)  |      Status:  new              
 Priority:  normal        |   Milestone:  Awaiting Review  
Component:  TinyMCE       |     Version:  3.0.1            
 Severity:  normal        |    Keywords:  reporter-feedback
--------------------------+-------------------------------------------------

Comment(by azaozz):

 Replying to [comment:4 nb000]:
 ...
 > The JS error means, that a is null,
 > therefore it has no method getLang() which could be called.
 > The variable a is initiated as follows:
 > a = tinyMCE.activeEditor
 > Here is the problem that should be fixed:
 > at the time the language string is being loaded
 > in wp-tinymce.php (-> wp-tinymce.js.gz -> wp-tinymce.js)
 > the tinyMCE has no active editor, it is only created later.

 This is controlled by the internal loading order in TinyMCE. All plugins
 are initiated after the core editor is ready.

 > ...
 > When the tinyMCE.addI18n is called with the hungarian strings,
 > the tinyMCE.i18n contains the hungarian strings.
 > But when the page finishes loading the hungarian strings are gone,
 > and the english strings are loaded...

 This sounds like TinyMCE is being initialized twice on the same textarea.
 Do you use any plugins that may be doing this?

 I'm uploading a patch that replaces `a = tinyMCE.activeEditor` with a
 reference to the current editor instance when loading translations. As far
 as I remember this had some issues in the previous version, seems to work
 properly now.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/15102#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list