Fix qTranslate Problem with WordPress 3.9 on Line 455

Posted on April 17, 2014 in WordPress Category

If you encountered any problem with qTranslate Plugin after the WordPress core update to version 3.9, and I bet a lot of you got this fatal error on line 455, read below to find the fix for this annoying problem.

The error should look like the text below and is triggered only inside articles after updating to WordPress 3.9.

Object of class WP_Post could not be converted to string in .../wp-content/plugins/qtranslate/qtranslate_core.php on line 455

Finding the Error Code

As the errors says you need to open the php file qtranslate_core.php and search for line 455 where you should have:

return $before.strftime($format, $date).$after;

Fixing qTranslate

To fix this error, delete the variable $before and you are done. Your new code should look like this:

return strftime($format, $date).$after;

Hope this trick was useful.

Related Articles
  1. Ivo says:

    I have spent hours on the net to find a solution for this. All the ones I have found seemed complicated, and did not fix the problem.
    This solution suggested by Dan is so simple, and yet so efficient. Thanks A LOT !

  2. Mata says:

    WP 3.9.1 and qTranslate 2.5.39 and qtranslate_javascript.php/qtrans_hook_on_tinyMCE in line 292

    — ed = new tinymce.Editor(id, tinyMCEPreInit.mceInit[id]);
    +++ ed = new tinymce.Editor(id, tinyMCEPreInit.mceInit[id], tinymce);

  3. Simon says:

    I use WordPress from the website (not from the software). Is there a way to fix it through the plugin page on the online WordPress panel? Thank you.

    • Hey Simon,

      You can use the file editor from your admin panel if is not disabled. This is the only alternative if you don’t have access to FTP.

Hint: Wrap your code syntax (html, css or others) between <pre> and </pre> tags. All comments are moderated.

one + = 2

Subscribe by E-mail

HTML-TUTS is built under the mighty WordPress platform.