WordPress.org

Forums

CKEditor for WordPress
[resolved] [Plugin: CKEditor For WordPress] qTranslate, not working (15 posts)

  1. sanch3x
    Member
    Posted 3 years ago #

    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
    ckEditor 3.6.2.4
    qTranslate 2.5.27

    Thanks for any help :)

    http://wordpress.org/extend/plugins/ckeditor-for-wordpress/

  2. michal
    Member
    Plugin Author

    Posted 3 years ago #

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

  3. sanch3x
    Member
    Posted 3 years ago #

    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

  4. michal
    Member
    Plugin Author

    Posted 3 years ago #

    OK, we try check this , please be patient

  5. michal
    Member
    Plugin Author

    Posted 3 years ago #

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

  6. sanch3x
    Member
    Posted 3 years ago #

    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

  7. michal
    Member
    Plugin Author

    Posted 3 years ago #

    Hi,
    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.

  8. Arik Niaz
    Member
    Posted 3 years ago #

    Hi,

    I also had the same problem with Ckeditor (Ver 3.6.2.4) 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!

  9. michal
    Member
    Plugin Author

    Posted 3 years ago #

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

  10. Arik Niaz
    Member
    Posted 3 years ago #

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

  11. Blueart
    Member
    Posted 3 years ago #

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

  12. creatorbri
    Member
    Posted 3 years ago #

    I'm using CKEditor 3.6.2.5 and qTranslate 2.5.2.8. 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){}
          jQuery('#ed_toolbar').hide();
        }
        // 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.

  13. michal
    Member
    Plugin Author

    Posted 3 years ago #

    @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.

  14. creatorbri
    Member
    Posted 3 years ago #

    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']
    hook.elements='qtrans_textarea_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) {
      hook.elements='qtrans_textarea_content';
      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!

  15. michal
    Member
    Plugin Author

    Posted 3 years ago #

    @creatorbri thank you for detailed informations.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • CKEditor for WordPress
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic