• Hi, I’ve just updated my site to wordpress 3.5 and managed to make qTranslate work with this new version (followed this link. But today when I try to edit a multilanguage text widget, I discover that the content of the widget keeps unchanged when I click “Save”. With the help of Firebug, I can see that content which is posted to admin-ajax.php is the old one, not the newly inputted. So, I guess something might be wrong with the javascript of the plugin. How can I solve the problem?

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter minhtam72

    (@minhtam72)

    Sorry, I took it wrong, the problem is not with qTranslate but with qTranslate extension. WordPress 3.5 does not use .live(‘click’… to handle the Save button click event, it use .bind(‘click.widgets-toggle’,… instead, that makes the old function of qTranslate extension processed after the old content has been submitted. Here is my fix:
    Edit qtranslate-extended.php:
    Replace line 202 to 210 with these lines:

    jQuery(document.body).bind('click.widgets-toggle', function(e){
         var target = jQuery(e.target);
         if ( target.hasClass('widget-control-save') ) {
              var form = target.parents('form:first');
              if(form.hasClass('multilanguage-form')){
                   prepareMultilanguageData(form);
                   setTimeout(function(){
                        generateMultilanguageElements(form.parent());
                   },2500);
              }
              e.preventDefault();
         }
    });

    Where do I find the file qtranslate-extended.php? I have no such file at all in my directory.

    Thread Starter minhtam72

    (@minhtam72)

    Hi anhede, qtranslate-extended.php is included in the plugin “qTranslate extension” , so you won’t find it in the folder of “qTranslate”.

    Thank you, that fixed it for me. It was deleting my text fields when I tried to create a new Multilanguage Text Widget (enabled by the qTranslate extension plugin.) You rock, minhtam72!!!

    Thread Starter minhtam72

    (@minhtam72)

    Thank you, cbarnett!

    Can you detail how to open and change qtranslate-extended.php please!
    I got the same problem when updating to 3.5.
    Thank you so much!

    To open the qtranslate-extended.php file, go to Plugins in the WordPress dashboard of your website, then navigate to “Editor.”

    To the right top side, there should be a drop down list of all the plugins you have installed. Select “qTranslate Extension” and it brings up a list of the php files for the plugin. Open the qtranslate-extended.php file, and in the Editor box, you will see all the code.

    For editing, I copied all of the code (Ctrl+A then Ctrl+C) and pasted it into DreamWeaver in a blank PHP file, to find the correct lines where to insert the fix. (lines 202 to 210) Since I changed my original php file already I’m not sure what the original code was before the replacement.

    After copying in the code pasted above by minhtam72 over these code lines, you can simply copy and paste all of the code from DreamWeaver back in, REPLACING the old code in the Editor code box.

    Click “Save” or “Update Plugin” and you’ve applied the fix!

    Hi cbarnett,
    Thank for your helping!
    I followed your guide, but here are files listed when i select qTranslate plugin
    qtranslate/qtranslate.php
    qtranslate/qtranslate_core.php
    qtranslate/readme.txt
    qtranslate/qtranslate_services.php
    qtranslate/qtranslate_hooks.php
    qtranslate/qtranslate_javascript1.php
    qtranslate/qtranslate_utils.php
    qtranslate/qtranslate_javascript.php
    qtranslate/qtranslate_widget.php
    qtranslate/qtranslate_configuration.php
    qtranslate/license.txt
    qtranslate/qtranslate_wphacks.php

    No qtranslate-extended.php file here!
    Please help me more!
    Thanks so much ??

    Oh, I did it!
    I miss in qtranslate plugin and extend.
    I have to install qtranslate extend before.

    Thank you so much!

    I think your problem is you are selecting the regular qTranslate – This fix is to be applied to a plugin called “qTranslate extension” which is a separate plugin from regular qTranslate here:
    https://www.ads-software.com/extend/plugins/qtranslate-extended/
    This is the plugin that gives you the Multilanguage Text Widget – qTranslate on it’s own does not come with a widget. So if you don’t have qTranslate extension installed already, your problem might be something else. This issue is specific to the multilanguage text widget of the qTranslate extension plugin.

    Hope this helps clarify.

    Thanks for this! works great

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘[Plugin: qTranslate] Cannot add/update multilanguage text widget!’ is closed to new replies.