• Resolved acub

    (@acub)


    I’ve replaced qtranslate with mqtranslate on multiple websites without problems and they all work with 3.9. However, there’s one that gives me an error in page edit screen. I have already tried disabling all plugins except mqtranslate, and changing theme to twenty-forteen but the problem persists.

    The error I get is “Uncaught TypeError: Cannot set property ‘elements’ of undefined ” and it happens in the qtrans_updateTinyMCE function from mqtranslate_javascript.php

    Any ideas on how to fix this?

    Thank you for your time and effort.

    https://wordpress.org/plugins/mqtranslate/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author chsxf

    (@chsxf)

    Hi,

    The error you are reporting is somewhat surprising because it would mean TinyMCE is not pre-configured by WordPress at the time our function tries to update it.
    This is unlikely and not really easy to track unfortunately…

    Thread Starter acub

    (@acub)

    With all plugins disabled, twenty-fourteen active and browser cache manually cleared I do not see visual/text tabs on page and posts edit screen. So I guess that’s why mqTranslate cannot find TinyMCE.

    For now I’ve just downgraded that particular website and I hope some future WP release will fix this.

    I’ll mark this resolved, as it doesn’t seem to be directly related with mqTranslate, it’s just a symptom of another problem.

    Plugin Author chsxf

    (@chsxf)

    Are you sure that in your user profile you have not checked “Disable the visual editor when writing”?

    Thread Starter acub

    (@acub)

    Funny. And a bit embarrassing.

    Short answer: that was the cause.

    Longer one: at the owner’s request I’ve made a function that was disabling the “disable visual editor” from user profile and also made a custom function that was specifically setting “Disable visual editor” to true upon saving user profile. This was like 3 years ago and I completely forgot about it.

    When I reverted to twenty-fourteen I never checked the user profile, only the page edit screen.

    Thank you.

    🙂
    _______________

    On a sidenote, I’d like to further express my gratitude for this fork of qtranslate and let you know that if you need a Romanian translator for .po/.mo files of your current and future plugins I am here.

    Plugin Author chsxf

    (@chsxf)

    We would be very pleased if you would like to provide this translate for mqTranslate. You can start from the original qTranslate Romanian .po file and ask PoEdit (or your translation software) to reparse mqTranslate files. Some texts remain the same between the two plugins.

    Plugin Author chsxf

    (@chsxf)

    However, your story leads me indeed to a bug where mqTranslate tries to set up TinyMCE even if it is not enabled. I need to check this out.

    chsxf, you have just fixed my problem too.
    Don’t know if you are aware of it but checking the “Disable the visual editor when writing” also prevents the dual language title from appearing when adding posts, and displays text in both languages when editing a post.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Cannot set property 'elements' of undefined | qtrans_updateTinyMCE’ is closed to new replies.