I encountered some strange behavior on a multi-lingual website today. The website was running WPML for the multi-lingual functionality, and the different languages were set up to appear in subfolders such as
fancypants.com/fr. The original language was shown on the base URL
What was happening? Multi-lingual content on any sub-page or post was displaying just fine. The subfolder URLs such as
/fr were redirecting to the base URL instead of showing the translated home pages, though.
What did I do to eliminate the problem?
I did a number of things to get to the root of this, among others:
- Reset the permalinks → no effect
- Switched the home page to a different page to if the problem persisted → it did
- Deactivated the popular Redirection plugin → no change
- Used an online redirection checker tool like redirect-checker.org to find out what was happening → the translated home pages were really giving out a
301 redirect Moved Permanentlysignal 😭
- Generated a new clean
.htaccessfile by first renaming the old one and then resetting the permalinks through the WP Dashboard → nothing to be gained here either
What was the root cause of the problem?
Every so often, conflicts between plugins are causing problems. So, I went to through the rather monotonous process of deactivating all plugins and reactivating them one-by-one to see if the problem persisted. And with this, I finally found the culprit.
On the website in question, my go-to Yoast alternative SEOPress was running (with the additional Pro version). SEOPress has its own redirection functionality but from my experience its performance and handling is inferior to the aforementioned Redirection plugin. Therefore, I never use it and just ignore it. Also in this case: there was no redirect setup here. But: the extension was active. SEOPress has this nice function where you can easily toggle various functions of the plugin on or off.
And the solution was really easy: I had to deactivate the “Redirections” functionality of SEOPress via its Dashboard and the unintended redirections of the multi-lingual home pages were gone. Bug or feature? I’d say: 🐛
Have you run into similar troubles? Are you part of the WPML fanbase or do you rather despise it? Let me know in the comments!
Update on 18 May 2020: SEOPress fixed this bug in version 220.127.116.11 of its Pro addon plugin. Check the change log and make sure you update before writing any blog posts! 😂
The header illustration is based on an image released by Craftwork on error404.fun. Lettering is based on the font Monotalic by Kostic Type Foundry. The illustration here on this page is published under a Attribution-ShareAlike License (CC BY-SA 4.0).