This thread is resolved. Here is a description of the problem and solution.
Problem:
After updating WordPress from version 6.6.2 to 6.8.2, WPML String Translation stopped working correctly. Translations exist, but revert to English when the plugin is enabled. Manually re-saving a string's translation temporarily fixes the issue, but this behavior varies across different environments (local, development, production).
Solution:
We recommend the following steps after ensuring you have a full site backup:
1) Navigate to WPML >> Support page, and click on the Troubleshooting link. 2) On the Troubleshooting page, execute the following actions in the *Clean up* section, waiting for confirmation after each: - Clear the cache in WPML - Remove ghost entries from the translation tables - Fix element_type collation - Set language information - Fix WPML tables collation - Assign translation status to duplicated content - Fix terms count - Fix post type assignment - Cleanup and optimize string tables - Show custom MO Files Pre-generation dialog box and generate .Mo files 3) Go to Settings >> Permalinks and resave the settings. 4) Clear all types of caches.
If the issue exists, please create a new staging site on the same server as your Production site, using your backup (from the version running WordPress 6.6). Then, follow these steps:
- Upgrade WPML plugins to the latest version (4.7.6).
- Upgrade WordPress to version 6.8.2.
- Check if the issue still occurs.
If the issue persists or the solution provided here becomes irrelevant due to updates or it does not apply to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If needed, please do not hesitate to open a new support ticket or visit our support forum for further assistance.
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.
Background of the issue:
WMPL AI Summery:
I am experiencing issues with WPML string translations on my site after a WordPress core update from 6.6.2 to 6.8.1. I have a production site and a local copy for testing. On both, translated strings revert to English when the WPML String Translation plugin is enabled. Disabling the plugin restores the correct languages. The translations exist but are not loading correctly. I attempted to refresh translations using do_action('wpml_reload_strings'); and icl_cache_clear(); but these did not resolve the issue.
My own summary:
This is a bit of a 2-in-1 problem, but I want to give all the context and research I can.
On my production site, all WPML string translations break after a WordPress core update (6.6.2 → 6.8.1). I can’t continue testing on the live environment, so I made a backup, copied the site, and ran it locally. Everything is identical except I already started on 6.8.1 locally. The same issue persists: all translated strings are shown in English.
When I disable the WPML String Translation plugin, the strings go back to their proper languages (Dutch, French). When I re-enable the plugin, the issue reappears.
I then checked the actual translations in the plugin. This is where my screenshot becomes relevant. There’s a pencil icon showing that the string is translated, but in the admin overview, the original string still appears untranslated. When I click to edit the translation, it opens empty at first, then autofills the translated text. After saving and a refresh, the string now displays correctly.
So the translations do exist, but something is preventing them from loading or applying into the plugin is my conclusion. Is there a way to trigger WPML String Translation to “refresh” or reapply all existing translations without manually opening and saving each one?
I tried:
do_action( 'wpml_reload_strings' );
icl_cache_clear();
Which did nothing.
Symptoms:
All WPML string translations break and revert to English after a WordPress core update. Translations exist but do not load correctly when the WPML String Translation plugin is enabled.
Questions:
Is there a way to trigger WPML String Translation to refresh or reapply all existing translations without manually opening and saving each one?
Please let us know the versions of WPML Multilingual CMS and String Translation installed on your live site. This information will help us better track and investigate the issue.
Thank you for the updates. Please try the following troubleshooting steps after a full site backup {mandatory} and make sure the issue exists or not.
1) Go to WPML >> Support page, click on the Troubleshooting link (blue link in the middle of the page)
2) On the Troubleshooting page, please click on the following options of the *Clean up* section. Wait for confirmation of processing after each one.
- Clear the cache in WPML
- Remove ghost entries from the translation tables
- Fix element_type collation
- Set language information
- Fix WPML tables collation
- Assign translation status to duplicated content
- Fix terms count
- Fix post type assignment
- Cleanup and optimize string tables
- Show custom MO Files Pre-generation dialog box >> Generate .Mo files
3) Visit Settings >> Permalinks, resave the settings
4) Clear all types of caches
>"- Show custom MO Files Pre-generation dialog box >> Generate .Mo files"
This was the only task I couldn't finish. the first button reloaded the page and didn't seem to add anything new. I did a ctrl+f for "Generate" and ".mo" but couldn't find the suggested button.
This was all done locally on an environment where bug is currently occuring.
Thank you for the updates. Please go to WPML >> String Translation and check if you are seeing the "Generate .mo files" popup.
Also, just to confirm, have you scanned your theme and only the relevant plugins (the ones that display labels on the frontend) for strings by going to WPML >> Theme and plugin localization?
"Generate .mo files" does not appear in the suggested spot. Just a giant table with filters at the top, and some utilities at the bottom.
All the strings are already available, but I did the search in "Theme and plugin localization" anyways. Hoping this might have been the nudge it needed, but this didn't solve it.
Thank you for the feedback. We have a couple of requests for tracking this bug.
1) This requires further checking, so could you please consider setting up a staging or development site for testing? This will help us troubleshoot the issue without affecting your live site.
Once the staging site is ready, please fill in the private details fields after taking a full site backup. I would like to access the admin area of your staging site to investigate further.
For more information about how we handle private information, please refer to the links below:
2) Could you please share the exact steps to reproduce the issue on the frontend, especially the specific post URL where the problem appears? This will help us ensure we are not missing any strings that are affected by the translation issue.
> "1) This requires further checking, so could you please consider setting up a staging or development site for testing?"
I tried this. Updated wordpress, the bug occurred, but after I've changed 1 string everything went back to normal. Locally and live it changes just that 1 string. I can still provide the details to this test server, if you want to access it.
If you think it's pointless I can open up my local server to you. Both locally and production behave very similar. I am able to keep this open in between 2pm - 6pm (GMT+2) (any day besides thursday, weekend).
Thank you for the feedback. This seems to be an unexpected behavior or an exception. So I would like to discuss it further with our team.
To summarize the issue:
After upgrading WordPress from version 6.6.2 to 6.8.2, the string translation stopped working as expected. However, it starts working again once you visit WPML >> String Translation and manually re-save a string’s translation.
You have observed the same behavior both in your local environment and on the live site after the upgrade, and it worked correctly again after re-translating a single string.
Am I understanding this correctly? Please confirm.
There are 3 environments by now. Local, development (requested by you), production.
"After upgrading WordPress from version 6.6.2 to 6.8.2, the string translation stopped working as expected. However, it starts working again once you visit WPML >> String Translation and manually re-save a string’s translation."
This is correct, but behaves differently depending on the environment.
Development: After saving 1 string everything worked fine again.
Local, Production: Every string needs to be saved manually in order for it to work.
Thank you for the details. Just to confirm, are the Development and Production sites hosted on the same server? This information may help us in tracking down the issue.
If possible, please create a new staging site on the same server as your Production site, using your backup (from the version running WordPress 6.6). Then, follow these steps:
- Upgrade WPML plugins to the latest version (4.7.6).
- Upgrade WordPress to version 6.8.2.
- Check if the issue still occurs.
If the bug remains on this new staging site, please share the credentials with us (enabling the private option for the next reply), along with a couple of sample strings that are not displaying translations on the frontend (please include the relevant post URLs). This will help us track the issue more efficiently.