• Resolved mike1707

    (@mike1707)


    Hello,

    we have some issues with Custom Permalinks and WPML plugin.
    If we use both of them we get an error and the translated page doesn’t work anymore.

    Is the plugin no longer compatible with WPML?

    Thanks in advance.

    Best regards

Viewing 15 replies - 1 through 15 (of 27 total)
  • Plugin Author Sami Ahmed Siddiqui

    (@sasiddiqui)

    HI Mike,

    The plugin does not compatible with WPML. This is an known and reported issue.

    We will fix this but, cannot give you a time frame at this stage.

    Regards,
    Sami

    netzwerkstudio

    (@netzwerkstudio)

    Hi there,

    is there any news on that topic?

    WPML and Custom permalinks worked fine until the last update.
    I would really appreaciate a suggestion on how long it would take to fix this issue, since google does not like to parse the Server Error 500 ??

    Thank you!

    regards
    – Alex

    Houke de Kwant

    (@houkedekwant)

    We got it to work by replacing
    add_post_meta( $id, 'custom_permalink', str_replace('%2F', '/', urlencode(ltrim(stripcslashes($_REQUEST['custom_permalink']),"/"))) ); on line 467 with add_post_meta( $id, 'custom_permalink', trailingslashit(str_replace('%2F', '/', urlencode(ltrim(stripcslashes($_REQUEST['custom_permalink']),"/")))) );, because we ended up in a redirect loop for some pages. (With this fix we force a trailingslash at the end of the url).

    Not sure if this fixes it for you, but you might give it a try.

    After editing the file you should resave your pages to update the post meta.

    netzwerkstudio

    (@netzwerkstudio)

    Hi,

    thank you for your code snippet!

    I have made the modifications and saved the pages, so that the trailing slash would be added properly. Unfortunately it does not change the result in Error 500.

    regards
    – Alex

    Houke de Kwant

    (@houkedekwant)

    It appeared we still had 500 errors on some pages, so some further research showed that the custom_permalinks_page_link function returned the wrong permalink if no custom_permalink was set. We’ve WPML setup with ‘Use directory for default language’ checked. However, the function returned the url without the language code for the default language. So we got stuck in the following loop if we didn’t set a custom permalink: https://siteurl.com/EN/page -> https://siteurl.com/page -> https://siteurl.com/EN/page -> etc… We now force the addition of the custom_permalink post_meta in the custom_permalinks_save_post function by adding `else{
    add_post_meta( $id, ‘custom_permalink’, trailingslashit(str_replace(‘%2F’, ‘/’, urlencode(ltrim(stripcslashes($original_link),”/”)))) );
    }` after the if statement. Now we had to resave the pages which died, the post meta was set and we got out of the redirect loop.

    Plugin Author Sami Ahmed Siddiqui

    (@sasiddiqui)

    Hey everyone(@mike1707, @netzwerkstudio, @houkedekwant)

    I have fixed the conflict with PolyLang Plugin. Please check the latest version and provide me your feedbacks.

    Regards,
    Sami

    Hi,

    well, i don’t use polylang, but WPML.
    Unfortunately, with version 0.9 the Error 500 remains. Translations are not working…

    regards
    – Alex

    Plugin Author Sami Ahmed Siddiqui

    (@sasiddiqui)

    Hi Alex( @netzwerkstudio),

    Can you provide me the Plugin URL you are using?

    Regards,
    Sami

    Hi,

    Plugin URL is https://wpml.org/

    regards
    – Alex

    Plugin Author Sami Ahmed Siddiqui

    (@sasiddiqui)

    Hi Alex( @netzwerkstudio),

    Sorry about the confusion. I have fixed the conflicts with PolyLang. Wpml seems to be a paid plugin so, i can’t help you in fixing the conflicts with it.

    Regards,
    Sami

    Hi there,

    it is a paid version, however there should be WPML guidelines you may find useful.
    WPML is probably the most spread Translation Tool for WP and you want to be compatible with it, i suppose ??

    Since i have an unlimited dev license of WPML i could set up a testing environment for you, if that would help.

    regards
    – Alex

    Plugin Author Sami Ahmed Siddiqui

    (@sasiddiqui)

    Alex it would be really helpful if you can provide me a testing env.

    Regards,
    Sami

    Hey,

    i was afraid, you were going to say that ??

    Please email me at ar[at]netzwerkstudio.de, so i can send you the login.

    regards
    – Alex

    Plugin Author Sami Ahmed Siddiqui

    (@sasiddiqui)

    Hey,

    I was waiting for the offer and you just did it ??

    I have emailed you for further info ??

    Regards,
    Sami

    Hi,

    any news on that?

    I just updated to 0.9.1 and still Error 500 with WPML.

    Do you still need access to my testing env or can i close it down?

    regards
    – Alex

Viewing 15 replies - 1 through 15 (of 27 total)
  • The topic ‘Custom Permalinks + Wpml Plugin’ is closed to new replies.