Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

1 Answer 1

up vote 1 down vote accepted

In /wp-content/plugins/qtranslate/qtranslate_wphacks.php, line 89, change this:

// do some crazy js to alter the admin view
$content .="<script type=\"text/javascript\">\n// <![CDATA[\n";
$content .="function qtrans_editorInit1() {\n";

// include needed js functions
$content .= $q_config['js']['qtrans_is_array'];
$content .= $q_config['js']['qtrans_xsplit'];
$content .= $q_config['js']['qtrans_split'];
$content .= $q_config['js']['qtrans_integrate'];
$content .= $q_config['js']['qtrans_use'];
$content .= $q_config['js']['qtrans_switch'];
$content .= $q_config['js']['qtrans_assign'];
$content .= $q_config['js']['qtrans_save'];
$content .= $q_config['js']['qtrans_integrate_title'];
$content .= $q_config['js']['qtrans_get_active_language'];
$content .= $q_config['js']['qtrans_hook_on_tinyMCE'];

// insert language, visual and html buttons

Into this:

// do some crazy js to alter the admin view
$content .="<script type=\"text/javascript\">\n// <![CDATA[\n";

// include needed js functions
$content .= $q_config['js']['qtrans_is_array'];
$content .= $q_config['js']['qtrans_xsplit'];
$content .= $q_config['js']['qtrans_split'];
$content .= $q_config['js']['qtrans_integrate'];
$content .= $q_config['js']['qtrans_use'];
$content .= $q_config['js']['qtrans_assign'];
$content .= $q_config['js']['qtrans_save'];
$content .= $q_config['js']['qtrans_integrate_title'];
$content .= $q_config['js']['qtrans_get_active_language'];
$content .= $q_config['js']['qtrans_hook_on_tinyMCE'];

$content .="function qtrans_editorInit1() {\n";
$content .= $q_config['js']['qtrans_switch'];

// insert language, visual and html buttons

I basically just reorder some javascript code so that the qTranslate js functions are defined before they're actually called. This stops them from generating errors when editing posts, which I believe was the source of the problem. This has fixed the deleted paragraphs issue for me. No other fix was needed.

I'm guessing the latest WP update did some internal changes to how javascript is displayed in WP admin, which messed up the order of qTranslate's (hackish) way of inserting javascript so that some functions were called before they were defined.

Update: Some additional fixes are available here: http://www.qianqin.de/qtranslate/forum/viewtopic.php?f=3&t=2841&sid=3ba1e915e737302449d22837aaf853d2&start=180#p10352

share|improve this answer
    
Thanks. This seems to solve my problems for now. I hope there will be some legacy update soon. –  JohnnyPea Mar 13 '12 at 23:17
2  
Some additional fixes are available here: qianqin.de/qtranslate/forum/… –  Aneon Mar 14 '12 at 23:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.