This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
Tagged: Exception, Not WPML issue, WCML
Related documentation:
This topic contains 5 replies, has 2 voices.
Last updated by martinS-144 1 year, 10 months ago.
Assisted by: Andrey.
Author | Posts |
---|---|
October 8, 2023 at 6:30 am #14533833 | |
martinS-144 |
On multilingual websites with WPML installed, updating other plugins causes an error 404 on all frontend pages. Refreshing the permalinks solves the issue. Comparing the .htaccess file before and after the permalink refresh shows 2 differences in lines 3 and line 7: ### when the error 404 is present RewriteEngine On RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteBase /fr/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /fr/index.php [L] ### when the permalinks have been refreshed RewriteEngine On RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] This problem is not specific to one website, and it is not a one-time issue either. This happend on half a dozen of my WPML websites on a regular basis over the last 12 months. And it does never happen with websites using Polylang or with single-language websites (around 50 websites in total). My first approach was to find out if a specific plugin causes this issue. And for quite some time it seemed that Ninja Forms was the culprit. So I deactivated auto-updates for this plugin, and everything worked well for some months. But recently, updates of other plugins like Simple History, Yoast SEO, or Child Theme Configurator have triggered the same problem. I even tried to implement an automatic permalink referesh after each plugin update through a custom function, but this was not reliable either. So what could be the cause for this problem? |
October 9, 2023 at 7:31 pm #14542313 | |
Andrey WPML Supporter since 06/2013 Languages: English (English ) Russian (Русский ) Timezone: Europe/Kyiv (GMT+03:00) |
I’m sorry that you ran into trouble with this. It looks like you are facing the same issue as described here: https://wpml.org/errata/htaccess-is-rewritten-with-language-folder/ I recommend testing the workaround that we shared there. Please back up your site before making any changes. |
October 9, 2023 at 7:33 pm #14542315 | |
Andrey WPML Supporter since 06/2013 Languages: English (English ) Russian (Русский ) Timezone: Europe/Kyiv (GMT+03:00) |
But before, you need to update your WPML plugin to the latest version 4.6.6 and add-ons to benefit from the latest bug fixes and improvements. This may not necessarily resolve your problem, however, in order to troubleshoot the issue best we need to work on the latest code available. You can check the latest released versions under "My Account -> Downloads" on this site. Instructions to update can be found here: http://wpml.org/faq/install-wpml/ Please remember to backup your database first before you proceed. |
October 12, 2023 at 4:15 am #14562357 | |
martinS-144 |
Hi Andrey, thank you for the hint. I will test this on one of our sites and report back. – Martin |
October 12, 2023 at 8:36 am #14563913 | |
Andrey WPML Supporter since 06/2013 Languages: English (English ) Russian (Русский ) Timezone: Europe/Kyiv (GMT+03:00) |
Take your time. Thank you, Martin |
October 19, 2023 at 5:29 am #14610305 | |
martinS-144 |
So far everything works well, but from my earlier experience we need more time for testing to see some more automatic update cicles, that's why I keep this ticket open. No need for a reply, though. |