“the j stands for Joint”
about me | research blog | wordpress plugins | jQuery plugins

23 August, 2009

qTranslate Widget Validation Fixer

This is a small plugin which fixes a validation error I was having with otherwise brilliant qTranslate plugin. Basically there were duplicate ID’s on the page, and I kept getting this error:
ID "qtranslate-3" already defined
For more, refer to this thread.

To date this doesn’t seem to have been fixed (I suspect not everyone experiences this issue), so I wrote a small plugin which manually re-writes on the qTranslate plugin files to get around the error.


  1. Copy into your wp-content/plugins directory.
  2. Activate it (with qTranslate already activated)
  3. You can de-activate immediately afterwards.
  4. Repeat steps 2 & 3 each time you update qTranslate

Download v1.1: qTrans Fixer Plugin


  1. Great! though.. the download link does not seem to work ?

    Comment by arjen — 10 September, 2009 @ 10:32 pm

  2. Whoops, forgot to zip it. Try now?

    Comment by John — 15 September, 2009 @ 11:46 am

  3. Thanks for writing a fix for this issue!
    However, I can’t get it to work on my site. When trying to activate the plugin, I get this error:

    Fatal error: Cannot redeclare qtwvf_fix() (previously declared in […]/wordpress/wp-content/plugins/qtrans-fixer-plugin.php:15) in […]/wordpress/wp-content/plugins/qtrans-fixer-plugin.php on line 13

    I’m using WordPress 2.9.4 and qTranslate 2.4.3 which I just re-installed. Do you have any idea what’s going wrong here?

    Comment by Jul — 3 October, 2009 @ 8:30 pm

  4. … I meant WordPress 2.8.4., of course.

    Comment by Jul — 3 October, 2009 @ 8:32 pm

  5. Ok it seems this an issue sometimes.. have updated to version 1.1, see if that fixes it?

    Comment by John — 3 October, 2009 @ 8:55 pm

  6. Wow, that was fast!

    Unfortunately, now I get a different error:
    Parse error: syntax error, unexpected T_SL in /wordpress/wp-content/plugins/qtrans-fixer-plugin.php on line 12

    Comment by Jul — 3 October, 2009 @ 9:14 pm

  7. Haha you’re just lucky I was at the computer 😛
    Hmm what version of PHP are you using? I’m guessing it’s earlier than 5.3.0 ?

    Comment by John — 3 October, 2009 @ 9:22 pm

  8. Lucky me. 😉
    Yes — my PHP version is 5.2.9. I’ve already asked my hoster when they’re going to upgrade.

    Comment by Jul — 3 October, 2009 @ 9:39 pm

  9. If you’re still having a problem with is, best thing is just to do it manually:
    open qtranslate_widget.php, and find the instruction below, around line 38:
    qtrans_generateLanguageSelectCode($type, $this->id);
    Simply append something to the end of the second parameter, like so:
    qtrans_generateLanguageSelectCode($type, $this->id.'_123');
    That’s it!

    Comment by John — 8 October, 2009 @ 10:40 pm

Leave a comment