Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
You are experiencing an issue where string translations revert to previous versions even after clearing the cache in WPML and the W3 Total Cache plugin, and deactivating the latter. The server does not have cache functions.
Solution:
The issue might be related to how textdomains are loaded in your theme or plugins, especially with the changes introduced in WordPress 6.7. We recommend checking if your theme or any plugins are using an outdated method to call textdomains. You should discuss this with your theme's developer. For more details, see the discussion on WordPress support.

If this solution does not apply to your case, or if it becomes outdated, we highly recommend checking related known issues at WPML Known Issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the issue persists, please open a new support ticket.

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.

This topic contains 2 replies, has 0 voices.

Last updated by takahiroK-2 6 days, 9 hours ago.

Assisted by: Andreas W..

Author Posts
December 28, 2024 at 5:53 am #16549699

takahiroK-2

Background of the issue:
I am experiencing an issue with string translations reverting to previous versions on my site hidden link. I suspect it might be similar to an issue discussed at https://wpml.org/forums/topic/string-translations-reverting-to-previous-versions-when-site-cdn-cache-is-cleare/. I have tried clearing the cache in WPML and the W3 Total Cache plugin, and even deactivated the plugin latter, but the issue persists. The server does not have cache functions.

Symptoms:
String translations are reverting to previous versions.

Questions:
Should I clear other 'cache'?
Should I export all translated strings to .po files, delete the string translation, and then add them again and import the .po files?

December 28, 2024 at 8:26 am #16549753

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hallo,

It might be that the minimum requirements are not met on the server:
https://wpml.org/en/home/minimum-requirements/

If you revise WPML > Support > WordPress you will be able to see how much memory the site is currently needing to run.

Your current values ​​are:
PHP MemoryLimit 256M
WP Memory Limit 128M

It might be that the currante usage is close to or above 128M.

If so, could you please increase the WordPress memory limit (WP Memory Limit) to at least 256 MB? WPML requires at least 128M.

You need to connect to your website's server and open the wp-config.php file in a text editor. The file is located in the WordPress root directory.

Edit this code to the wp-config.php file to increase WordPress memory:

define ('WP_MEMORY_LIMIT', '256M');

It should be located just before this comment:

// That's all, stop editing! Happy blogging.

The current values ​​can be viewed under WPML > Support > WordPress.

These settings can be restricted directly by your hosting provider. Therefore, I recommend contacting them and asking them to change them directly if the changes are not applied immediately.

Best regards
Andreas

December 28, 2024 at 10:05 am #16549823

takahiroK-2

Thank you for your support. I increased the memory limit to 256MB and confirmed it on the Support page and cleared the cache of WPML and W3 Total Cache, but, the situation is the same.
On our Chinese site hidden link, English strings like "CONTACT" are in the string translation and already translated into Chinse. But, they are displayed in English.
Some Chinese string like "旅遊" under "CONTACT" is Chinese, and those strings are imported from .po file before and displayed in Chinese correctly.
I suppose strings translated in the string translation editor after importing the .po file are not reflected. It was reflected before I moved the site (database and files) from another server. At that time, I changed URL strings on database by "Search-Replace-DB" tool.
I guess some cache are not still cleared. If so, can we deleted cache files or table on database?

December 28, 2024 at 10:12 am #16549832

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hi,

I would like to offer to take a closer look and request temporary access (wp-admin and FTP) to the site to investigate the issue further.

The required fields are below the comment section when you log in to leave the next reply. The information you provide is private, meaning only you and I can see and access it.

IMPORTANT
Please be sure to back up the site and database before granting us access.

If you can't see the "wp-admin / FTP" fields, your post and site login details will be set to "PUBLIC". DO NOT publish the data unless you see the required wp-admin / FTP fields.

I may need to install a plugin called "All In One WP Migration" here to create a copy of the site that I can use to investigate the issue further.

However, I would also be very grateful if you could provide a staging site or copy of the website from your server for this purpose.

If you have any questions about creating such a staging site, you can consult your hosting provider. Please note that WPML must also be registered on this staging site at https://wpml.org/de/account/websites/.

If you are not able to provide such a copy of the website for testing, please let me know on this ticket.

The private reply form looks like this:
hidden link

The next time you reply, click on "I still need assistance".

Video:
hidden link

Please note that we are obliged to request this information individually on each ticket. We are not allowed to access any credentials that were not specifically submitted on this ticket in the private response form.

Best regards
Andreas

December 28, 2024 at 2:31 pm #16550155

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

I see I only had to save the strings again inside String Translation and it solved the issue.

Could you please confirm if this only happens for strings from the text domain "smr", means strings coming from your custom theme?

If so, you might need to consider revising if the custom theme is loading the textdomains as expected, as there were some changes in the latest version of WordPress about how to call textdomains in themes and plugins.

https://wordpress.org/support/topic/wp-6-7-function-_load_textdomain_just_in_time-was-called-incorrectly/

December 28, 2024 at 11:59 pm #16550581

takahiroK-2

Thank you so much! We are using only our text domain "smr" and it seems that all the strings are shown well now.
I found error messages "Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the

breadcrumb-navxt

domain was triggered too early." are in wp-content/debug.log file, but I think we don't use breadcrumb's strings.

Questions:
- How did you "save the strings again inside String Translation"? Can we do that if this issue happen again?
- Will this issue happen again when we change the URL of the site for releasing the site?
- How can we "consider revising if the custom theme is loading the textdomains as expected"?

Thank you for your quick support,

December 29, 2024 at 12:14 am #16550586

takahiroK-2

I found this issue has not been solved for thai language site: hidden link Two Chinese sites are fine.

December 29, 2024 at 2:02 am #16550611

takahiroK-2

Thai language site's strings are now shown well after I just added translation for new strings. So, I understand how to "save the strings again inside String Translation".

Please reply to other two questions ASAP.

Sorry for my multiple posts.

December 29, 2024 at 2:13 am #16550617

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

WordPress 6.7 changes the way how textdomains are loaded in themes and plugins.

Our plugins are already optmized for this case, but it might be that your custom theme or other plugins is not yet calling the textdomains in the correct way and instead using an outdated method.

This would need to be dicussed with your theme's developer.

Source:
https://wordpress.org/support/topic/6-7-load_theme_textdomain-desnt-work/

December 29, 2024 at 3:09 am #16550633

takahiroK-2

Thank you so much for your very quick responce.
I changed the code of load_theme_textdomain() in our theme file as the source you mentioned and seems to work fine.

I suppose even if the issue happen again when we change the URL of the site for releasing the site, it will solve after I just save one string translation.

Thank you again,