WordPress.org

Ready to get started?Download WordPress

Forums

qTranslate
[resolved] qTranslate broken after update WP to 3.5 version (43 posts)

  1. rangitoto
    Member
    Posted 1 year ago #

    installing the dev. version from qtranslate solved the problem. I think something is wrong with (gzip?) compression in qtranslate_javascript.php from pastebin (see above).

  2. 3pepe3
    Member
    Posted 1 year ago #

    If you use another plugin to use the visual editor on widgets then you should use something like this:

    if (is_admin()) {
    			switch (basename($_SERVER['SCRIPT_FILENAME'])) {
    				case "post.php":
    				case "post-new.php":
    				case "comment.php":
    					add_filter( 'wp_default_editor', create_function('', 'return "html";') );
    				default:
    					return;
    			}
    		}

    instead:
    add_filter( 'wp_default_editor', create_function('', 'return "html";') );

  3. lyros
    Member
    Posted 1 year ago #

    If you do not need to stick with tinymce default editor of WordPress, you can try the CKEditor plugin.
    I followed your instructions

    • about the Version define('QT_SUPPORTED_WP_VERSION', '3.5'); at qtranslate.php
    • about the waiting time at qtranslate_javascript.php changed 250 to 500 at line 25

    Then I installed the CKEditor and it seems to work ok.

  4. cbarnett
    Member
    Posted 1 year ago #

    Thanks to nikolov and felix for investigating these steps and doing the research. I implemented the fixes they suggested in the forum (copied again below) and was successful for my site on version 3.5

    1- change define('QT_SUPPORTED_WP_VERSION', '3.4.2');
    to define('QT_SUPPORTED_WP_VERSION', '3.5');

    2- Use this code for qtranslate_javascript.php: here

    3 - add this code into your functions.php
    add_filter( 'wp_default_editor', create_function('', 'return "html";') );

    You guys rock in Qian Qin's absence for helping with this. I suggest we donate to help support and encourage Qian and his continued development of this plugin which has been perfect for my needs.

  5. 1energy1
    Member
    Posted 1 year ago #

    I did exactly that 3 steps using qtranslate dev version 2.5.33b and is working perfect on WordPress 3.5., tested with Ultimate Tinymce & CKEditor in my website 1energy1.com

  6. Keith
    Member
    Posted 1 year ago #

    Here is a kludge to re-enable visual mode for the stock editor (TinyMCE) via JavaScript/jQuery. Tweak as needed.

    add_filter('admin_head', 'toggle_editor_visual_mode');
    function toggle_editor_visual_mode() {
     echo '
      <script type="text/javascript">
       jQuery(document).ready(function() {
        if(jQuery("#qtrans_textarea_content").length > 0) {
         jQuery("#qtrans_textarea_content").css("height", "300");
        }
        if(jQuery("#qtrans_textarea_content_tbl").length > 0) {
         jQuery("#qtrans_textarea_content_tbl").css("height", "300");
        }
        if(jQuery("#content-tmce").length > 0) {
         jQuery("#content-tmce").click();
        }
      });
     </script>
     ';
    }
  7. marblesandmore
    Member
    Posted 1 year ago #

    Hello all, thank you for helping!

    I am very eager to use the solutions given above, but I have no clue where to paste them? For example @Keith's solution. Where do I need to add that?

    And as @cbarnett suggests in step 3: addition to functions.php:
    Where exactly IN fuctions.php do I add this line?

    Thank you :)

  8. Keith
    Member
    Posted 1 year ago #

    Both my example and step 3 go into functions.php. Unless you have a very convoluted functions.php file, those lines can simply be appended to the bottom of the file.

  9. marblesandmore
    Member
    Posted 1 year ago #

    I use the functions.php that is in my theme-folder but when I add your addition, I see these lines above my header:

    add_filter('admin_head', 'toggle_editor_visual_mode');
    function toggle_editor_visual_mode() {

    Any ideas?

  10. Keith
    Member
    Posted 1 year ago #

    I suspect you took that statement literally and put the code at the very bottom of functions.php, after the PHP closing (?>) tag instead of immediately before. Anything outside of PHP opening/closing tags is displayed verbatim.

    The example at the bottom of the following article will give you a birds-eye view of what a typical functions.php file should look like: http://justintadlock.com/archives/2010/12/30/wordpress-theme-function-files

    Alternatively, you can simply omit/remove that bottom closing tag from functions.php, as it is optional per the official PHP documentation. Removing it will allow your functions.php to be truly appendable, and you won't have to worry about inadvertently displaying code instead of running it.

  11. romulocollopy
    Member
    Posted 1 year ago #

    Hey guys,

    I had this problem today and I saw they released a "in dev" version. http://www.qianqin.de/qtranslate/download/

    It's for 3.5, so if you are already on 3.5.1, you need to change the qtranslate.php line #90 to

    define('QT_SUPPORTED_WP_VERSION', '3.5.1');

    It worked fine to me.

  12. marblesandmore
    Member
    Posted 1 year ago #

    Wow thanks, that solved a lot of problems.
    However the editor still stays very small :(
    Any ideas :) ?

  13. was955
    Member
    Posted 1 year ago #

    if u download the last version from here
    http://downloads.wordpress.org/plugin/qtranslate.latest-stable.zip

    and go to file qtranslate_javascript.php

    on line 296 change the number from 300 to 500
    like this

    var h = getUserSetting( 'ed_size' );
    			if(h<300) h = 500;

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.