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

WordPress Trac wp-trac at lists.automattic.com
Wed Oct 20 08:00:05 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 nb000):

 Replying to [comment:3 azaozz]:
 > The JS error means that the string `wpeditimage.edit_img`
 > is not loaded into TinyMCE i.e. `wpeditimage` = null.
 No, you are wrong here.
 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.

 > You can check for the existence of that in the DOM inspector,
 > go to tinyMCE => i18n object, it should contain all translated strings.
 I checked it in firebug.
 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,
 which are not used, since in tinyMCEPreInit mceInit { ..., language:"hu",
 ... }


 > Also check if that JS block is recognized and loaded properly.
 Yes it works.
 I put a breakpoint and saw the hungarian strings in the tinyMCE.i18n
 object.
 > It should appear in the list of scripts for the page (in the debug
 tools/Firebug).
 Wrong again.
 Firebug and the other debuggers do not list the scripts from a html source
 separately,
 you only see that post.php has some scripts
 (you can see the full html code including all inline scripts).

 > It is possible that PHP reaches some kind of limit while outputting the
 translated strings, but if it was running out of memory you wouldn't have
 seen the whole JS block in the source.
 I agree, the problem is not PHP related.

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


More information about the wp-trac mailing list