Intro

qTranslate (http://www.qianqin.de/qtranslate/) hasn’t been updated for quite a while, since the WordPress version 3.8.1. Since it is one of the best solutions, if not the best one, to multilingual wordpress it deserves a chance with the newer WordPress versions. If you install “latest” Qtranslate on the latest WordPress 4.2.2, you get the warning:

The qTranslate Editor has disabled itself because it hasn’t been tested with your WordPress version yet. This is done to prevent WordPress from malfunctioning. You can reenable it by clicking here (may cause data loss! Use at own risk!

If you feel like “living on the edge”, you might not want to click to enable the editor enhancement every time and you would want to turn of the pesky warning and use the plugin as if it was version 3.8.1. What I did was simply open the terminal, cd to the qtranslate plugin folder and grep -r for the first part of the warning:

cd htdocs/{wordpress-installation}/wp-content/plugins/qtranslate
grep -r "The qTranslate Editor has disabled itself"

It returned:

qtranslate_wphacks.php: echo '<div class="updated" id="qtrans_imsg">'.__('The qTranslate Editor has disabled itself...

So the warning was in the file qtranslate_wphacks.php.

 

What you need to do

Open up qtranslate_wphacks.php located in the plugins directory, find the function qtrans_modifyRichEditor and comment out the lines from line 54 to 59. You will notice that the last line gives the value false to the variable $init_editor, since we want to init the editor we commented that out.

function qtrans_modifyRichEditor($old_content) {
 global $q_config;
 $init_editor = true;
/* if($GLOBALS['wp_version'] != QT_SUPPORTED_WP_VERSION) {
 if(!(isset($_REQUEST['qtranslateincompatiblemessage'])&&$_REQUEST['qtranslateincompatiblemessage']=="shown")) {
 echo '<div class="updated" id="qtrans_imsg">'.__('The qTranslate Editor has disabled itself because it hasn\'t been tested with your WordPress version yet. This is done to prevent WordPress from malfunctioning. You can reenable it by <a href="javascript:qtrans_editorInit();" title="Activate qTranslate" id="qtrans_imsg_link">clicking here</a> (may cause <b>data loss</b>! Use at own risk!). To remove this message permanently, please update qTranslate to the <a href="http://www.qianqin.de/qtranslate/download/">corresponding version</a>.', 'qtranslate').'</div>';
 }
 $init_editor = false;
 }
 //save callback hook */
 
 preg_match("/<textarea[^>]*id=\"([^']+)\"/",$old_content,$matches);
 $id = $matches[1];
 preg_match("/cols=\"([^\"]+)\"/",$old_content,$matches);

Conclusion

The interface is a bit buggy, haha, but it works on 4.2.2. There is no data loss, at least not that I saw. If someone is not bored to fix the interface issues we could have a working plugin again.