Support » Plugins and Hacks » CKEditor for WordPress » [Resolved] [Plugin: CKEditor For WordPress] qTranslate, not working

[Resolved] [Plugin: CKEditor For WordPress] qTranslate, not working

  • Hello,

    I installed the plugin alongside qTranslate and now I get a blank box with some javascript errors. I googled for a long time and that’s when I found out there was a conflict between the two plugins.

    I see that in your changelogs that you fixed the issue in a previous update but I’m still having the issue.

    At the time of writing this post I had all the latest versions:

    WP. 3.3.1
    qTranslate 2.5.27

    Thanks for any help 🙂


Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author michal


    What JavaScript errors do you have ?
    Without ckeditor plugin qTranslate newest version works fine in WP 3.3.1 ?

    Hi Michal,

    If I deactivate ckeditor qTranslate works as expected.

    When I reactivate it I get the following javascript error (taken from firebug):

    Error: tinyMCE is not defined
    Source File: /ihfc/wp-admin/post-new.php?post_type=page
    Line: 554

    Plugin Author michal


    OK, we try check this , please be patient

    Plugin Author michal


    I committed changes to revision: 495509.
    Please check it.

    Hi, thank you for looking into this. I’m sorry to ask though, how do I download a specific revision? I tried looking into the SVN branches but I just see the source code.

    Thank you

    Plugin Author michal


    here you can get source code from SVN SVN link and here you can download latest DEV version of plugin:
    DEV version link. Please try this, but remember that this is beta version of plugin.


    I also had the same problem with Ckeditor (Ver and qTranslate (latest verdion: 2.5.28)

    so i installed the latest DEV version of ckeditor and now everything works fine.

    can you please update the next Version of ckeditor to work with qTranslate? (i need it for a multi-language Hebrew-English-Arabic Website) thanks!

    Plugin Author michal


    @arik Niaz fix from DEV version will be added to next version of plugin.

    thanks a lot!
    יישר כוח!

    Works ! Thanks !
    Qian Qin had not responded in the forum…

    I’m using CKEditor and qTranslate I’m getting a Javascript error: “hook is undefined”

    This error occurs in the function qtrans_editorInit3(). Here’s an excerpt from the code where the problem is occuring:

    wpOnload = function() {
        for(var i in tinyMCEPreInit.qtInit) {
          var tmp = tinyMCEPreInit.qtInit[i];
          tmp.id = 'qtrans_textarea_'+tmp.id;
          try { quicktags( tmp ); } catch(e){}
        // remove hook so tinymce doesn't load for content
        var hook = tinyMCEPreInit.mceInit['content']
        hook.elements='qtrans_textarea_content';	// NOTE: ERROR OCCURS ON THIS LINE
        delete tinyMCEPreInit.mceInit['content'];
        tinyMCEPreInit.mceInit['qtrans_textarea_content'] = hook;
        // fix html for tinymce
        if('html' != getUserSetting( 'editor' )) {
          var ta = document.getElementById('content');
          var texts = qtrans_split(ta.value);
          var content = '';
          content = qtrans_integrate('de', switchEditors.wpautop(texts['de']), content);
          content = qtrans_integrate('en', switchEditors.wpautop(texts['en']), content);
          content = qtrans_integrate('zh', switchEditors.wpautop(texts['zh']), content);
          ta.value = content;
        if(typeof(wpOnload2)=='function') wpOnload2();

    One more thing: It’s rather odd but at first, CKEditor was loading just fine (though I was still getting the “hook” error mentioned above). But when I clicked the qTrans tab to switch to another language, the editor broke completely, and now — even when I switch to editing a new page — CKEditor doesn’t come up at all, and I still get the same “hook” error.

    Plugin Author michal


    @creatorbri thank you for noticing this.
    Do you have this issue with latest version of qTranslate plugin (2.5.29) and DEV version of CKEditor for wordpress ?
    We try check this.

    Yes, I tried both to no avail.

    In an effort to troubleshoot further I managed to “hide” the error by changing this:

    // remove hook so tinymce doesn't load for content
    var hook = tinyMCEPreInit.mceInit['content']
    delete tinyMCEPreInit.mceInit['content'];
    tinyMCEPreInit.mceInit['qtrans_textarea_content'] = hook;

    To this:

    // remove hook so tinymce doesn't load for content
    var hook = tinyMCEPreInit.mceInit['content']
    if (hook) {
      delete tinyMCEPreInit.mceInit['content'];
    } else {
      hook = null;
    tinyMCEPreInit.mceInit['qtrans_textarea_content'] = hook;

    Indeed eliminated the error; but I still can’t use them together.

    What seems to be happening is that qtranslate_textarea_content and the CKeditor div both get added at the same level in the Source. I’ll try and produce a screenshot at some point, because the resulting behavior is very strange:

    1. At the top I have my Language tabs (courtesy qTranslate), and my Visual and HTML tabs.
    2. Below that is the CKEditor, if I’m on the Visual tab, or the original ‘content’ textarea if I’m on the HTML tab.
    3. Below THAT is the qtranslate_textarea_content textarea. (Lately its been putting a
      in there, but that doesn’t seem consistent.)
    4. Clicking another language besides the default (English in my case) results in the CKEditor going away, but the English tab remains selected.
    5. As long as WP thinks I’ve selected another language for my editing language, there’s nothing I can do to restore the CKEditor; reloading the page, or adding a new page, makes no difference. Only by clicking the “English” link on the left-side Admin Menu can I restore things to their original state.
    6. Also, typing in the qtranslate_textarea_content textarea below the CKEditor box does nothing useful.
    7. Clicking the HTML tab, by the way, displays the following in the standard ‘content’ textarea:
      <!--:en--><br /><!--:--><!--:de--><!--:--><!--:zh--><!--:-->

    Note that I’m not looking at it now, I had to deactivate the CKEditor plugin and go back to TinyMCE; so I’m not guaranteeing 100% accuracy on anything I just said 😉

    Still, I really hope this helps; I really think my client would be better off using CKEditor than TinyMCE!

    Plugin Author michal


    @creatorbri thank you for detailed informations.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘[Resolved] [Plugin: CKEditor For WordPress] qTranslate, not working’ is closed to new replies.
Skip to toolbar