Support » Plugin: WPML Multilingual CMS » [Plugin: WPML Multilingual CMS] Category links broken

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Amir Helzer


    It’s a known problem with WPML 2.0.4 and is fixed in the current versions.

    I have the same problem, What is the solution? upgrading to the paid version?

    Plugin Author Amir Helzer


    WPML 2.0.4 (which you can download from runs fine on WordPress 3.0.5, but not on WordPress 3.1. If you look at the plugin information box, you’ll see that it says “Compatible up to: 3.0.5”.

    The current (paid) versions, available from are tested and working fine with newer WordPress versions and come with guaranteed support.



    Same problem… it is duplicating the language directory in the category links. It should link to but instead links to

    Is upgrading to the paid version the only solution or has someone found a way to fix it?


    Same problem… it is duplicating the language directory in WP 3.1…

    it seems to be an intentional bug, to force WPML users to buy the commercial version. I was a long time user of WPML, willing to pay for a good service, but not that way.

    very bad behavior of the WPML folks. non acceptable!

    HI Everyone,
    I can’t afford this upgrade so I found a “quick&dirty” solution for this bug. You do not need to edit anything but the template file 404.php (page not found) of your theme.

    I put the following lines in the beginning of the file (after <?php) :

    function curPageURL() {
    $pageURL = ‘http’;
    if ($_SERVER[“HTTPS”] == “on”) {$pageURL .= “s”;}
    $pageURL .= “://”;
    if ($_SERVER[“SERVER_PORT”] != “80”) {
    } else {
    return $pageURL;
    $cur_url = curPageURL();
    $repeats = array(“/ru”, “/it”, “/es”, “/de”, “/fr”);
    foreach($repeats as $repeat){
    if(strstr( $cur_url, $repeat.$repeat.’/’ )){
    $cur_url = str_replace($repeat.$repeat.’/’, $repeat.’/’, $cur_url);
    header( ‘Location: ‘.$cur_url ) ;

    What is does is to remove the superfluous part from the URL and reload the correct URL. You should list all your additional language domains as values in $repeats (in my case, these are 5 languages).
    I am sure there are more elegant solutions, but I am not a guru and this one at least works and does not let this “intentional bug” ruin your blog. Feel free to contact me if you need help adjusting this solution to your case.

    Thread Starter Soccerwidow


    Hello svetikkotik,

    Thank you for the offered solution. However, unfortunately it didn’t work for me, but I had a bright idea this morning…

    I downloaded the WordPress plugin for redirection: and have now redirected all faulty categories to the correct ones. Simple, isn’t it? Took me only 4 months to think of this!

    Luckily I don’t have too many categories, therefore it was just half an hour to get my blog sorted. Now it’s up and running as smoothly as it should have been all along.

    Fix this problem. Open file “sitepress.class.php” in plugin “sitepress-multilingual-cms”.

    Find line 3406

    if($this->get_default_language() != $element_lang_details->language_code){
    $p = $this->convert_url($p, $element_lang_details->language_code);

    and comment this line.

    Thank you artlosk!!
    Your solution is great and it totally fixes the problem with the category links. I’ve been trying (with ‘tax_permalink_filter’ and so on) but i can’t find the solution with the tag links. Do you know how to fix this one?
    Thanks again

    My solution Fix problem with tags!
    Open file “”sitepress.class.php” in plugin “sitepress-multilingual-cms”.
    find line “function convert_url($url, $code=null)” (Find line 3311)
    Replace code in function “function convert_url($url, $code=null)” follow function code:

    [Code moderated as per the Forum Rules. Please use the pastebin]

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Plugin: WPML Multilingual CMS] Category links broken’ is closed to new replies.