Custom Permalinks + Wpml Plugin
-
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
-
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,
SamiHi 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
– AlexWe got it to work by replacing
add_post_meta( $id, 'custom_permalink', str_replace('%2F', '/', urlencode(ltrim(stripcslashes($_REQUEST['custom_permalink']),"/"))) );on line 467 withadd_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.
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-
This reply was modified 9 years, 3 months ago by
netzwerkstudio.
It appeared we still had 500 errors on some pages, so some further research showed that the
custom_permalinks_page_linkfunction 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: http://siteurl.com/EN/page -> http://siteurl.com/page -> http://siteurl.com/EN/page -> etc… We now force the addition of the custom_permalink post_meta in thecustom_permalinks_save_postfunction 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.Hey everyone(@mike1707, @netzwerkstudio, @houkedekwant)
I have fixed the conflict with PolyLang Plugin. Please check the latest version and provide me your feedbacks.
Regards,
SamiHi,
well, i don’t use polylang, but WPML.
Unfortunately, with version 0.9 the Error 500 remains. Translations are not working…regards
– AlexHi 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,
SamiHi 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-
This reply was modified 9 years, 2 months ago by
netzwerkstudio.
Alex it would be really helpful if you can provide me a testing env.
Regards,
SamiHey,
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
– AlexHey,
I was waiting for the offer and you just did it π
I have emailed you for further info π
Regards,
Sami-
This reply was modified 9 years, 2 months ago by
Sami Ahmed Siddiqui.
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 -
This reply was modified 9 years, 3 months ago by
The topic ‘Custom Permalinks + Wpml Plugin’ is closed to new replies.