Background of the issue:
I am trying to show translated strings on this site: hidden link. This was working until updating to WP 6.7. I have already updated WPML to the latest version.
Symptoms:
Translated strings from .mo are not shown after updating WP to 6.7. I expected to see strings like 'course', 'summary', 'outcomes' translated to Dutch, but instead, I got the untranslated strings in English.
Questions:
Why are the translated strings not showing after updating to WP 6.7?
Is there a compatibility issue between WP 6.7 and the latest version of WPML?
Welcome to the WPML support forum. I will do my best to help you to resolve the issue.
Please tries the following troubleshooting steps after a full site backup{mandatory} and make sure the issue is existing 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
Thanks, I've tried all, but it doesn't help.
Just to be clear: the translated string are coming from an .mo file in our theme. They are linked via load_theme_textdomain().
Thank you for the updates. Please visit WPML>>String Translation after a site backup and enable the *Look for strings while pages are rendered* option of *Auto register strings for translation* section(on the bottom of the screen). Then visit the frontend pages and check the issue is existing or not. This option will be disabled in a couple of hours automatically. But will help us to track the issue in similar cases.
Thanks for the help.
Turns out the issue wasn't in WPML but in the WP 6.7 Core. See this issue: https://core.trac.wordpress.org/ticket/62337
Should be fixed in 6.7.1, but the workaround proposes in the issue fixes the problem for us.