Skip Navigation

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.

WordPress 6.7 has introduced a new issue that impact translations, please update WooCommerce and WPML to the latest versions before you report issues. More about this here - https://wpml.org/errata/php-error-wp-6-7-notice-function-_load_textdomain_just_in_time-was-called/
Sun Mon Tue Wed Thu Fri Sat
9:00 – 15:00 9:00 – 15:00 9:00 – 15:00 9:00 – 15:00 9:00 – 15:00 - -
- - - - - - -

Supporter timezone: Asia/Yerevan (GMT+04:00)

Tagged: 

This topic contains 0 replies, has 2 voices.

Last updated by Christopher Amirian 3 days, 22 hours ago.

Assisted by: Christopher Amirian.

Author Posts
November 11, 2024 at 12:14 pm #16388414

johannesB-16

Background of the issue:
I am experiencing an issue with WPML on my site hidden link. Over time, some strings lose their original language and are assigned to another language. This issue mostly occurs with strings from the customizer, although they are registered in XML translation.

Symptoms:
Strings in string translation do not remain in their correct language. For example, 'Mayorista' is Italian but is shown as German. Refreshing the page changes the language displayed.

Questions:
Why do strings lose their original language assignment over time?
How can I ensure that strings remain in their correct language?
Is there a way to fix the language assignment issue for customizer strings?

November 11, 2024 at 1:31 pm #16388862

johannesB-16

I tried this solution, but the issue remains:

https://wpml.org/errata/admin-strings-replaced-by-translations-after-visiting-the-customizer/

November 11, 2024 at 1:53 pm #16389026

johannesB-16

I now receive the follwoing error message:

AH01071: Got error 'PHP message: PHP Warning: Undefined array key "wp_customize" in /var/www/vhosts/berotec.de/httpdocs/wp-content/komponenten/wpml-string-translation/inc/admin-texts/wpml-admin-texts.class.php on line 214; PHP message: PHP Warning: Undefined array key "screen_id" in /var/www/vhosts/berotec.de/httpdocs/wp-content/komponenten/wpml-string-translation/inc/admin-texts/wpml-admin-texts.class.php on line 214'

November 12, 2024 at 9:59 am #16391885

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi,

Thank you for following the steps mentioned in the errata.

Unfortunately, the login information is deleted by the system and I need that to continue the troubleshooting.

I'd appreciate it if you could give me the URL/User/Pass of your WordPress dashboard after you make sure that you have a backup of your website.
It is absolutely important that you give us a guarantee that you have a backup so if something happens you will have a point of restore.

Make sure you set the next reply as private.

Also, I need your permission to copy your website to our server, if ther is a need for further investigation by the second tier support.

Thanks.

November 14, 2024 at 7:43 am #16400905

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi,

Thank you for the login information.

I went to WordPress Dashboard > Plugins > Plugin File Editor and from the top right section selected WPML String Translation and checked the file that was mentioned in the errata you talked about.

I found out that the change was not applied, I applied the change.

Did a cache purge, but now I am not sure if the result is correct as I searched for Mayorista but I did not find any.

Would you please check and see if things work ok now? And if not, please tell me which string to check.

Thanks.

November 14, 2024 at 11:04 am #16401856

johannesB-16

Hi and thanks for looking onti this.

I removed the additional code since it didn't solved the issue and furthermore produces a lot of php warings (see attachement).

wrong language_2.png
wrong language.png
warning.png
November 14, 2024 at 1:29 pm #16402792

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi,

Thank you, for the warning you can ignore them at the moment as it will not cause any issues on the current version.

I checked and now see the "Mayorista" in German. May I know what did you do? I want to know the steps as I could not see that in string translation when I changed the code in WPML String translation.

Please tell me the detailed that I need to follow.

Also, I do not have a tool to exclude the orders, do you have such a tool that you can give so we can check Maybe a staging version of the website without the orders so we can check.

As we need to do troubleshooting that can not be done on a live website.

You can set the next reply as private to provide such info.

Thanks.

November 14, 2024 at 2:15 pm #16403315

johannesB-16

Hi,

I'm not shure right now how to manage a copy without the sensible data. I'll have to look for a solution.
Meanwhile, I'll try to explain the issue:

In the past few minutes I tried to handle strings from the following domains:

admin_texts_astra-settings
admin_texts_*******_user_roles

Strings on both domains were mixed in their languages and were also marked as update needed.

When I pointed the string to the right language, the page reloaded, the language was set right but the string changed from english to german. Now I pointed the english string to the english language, the string switched back to german.
See attachements.

Please note, that I turned off WPRocket, since I wanted to see, if that makes any difference. But it didn't.

germnan strings.png
english strings.png
November 15, 2024 at 6:59 am #16405813

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi,

Thank you I will wait for a version that contains no sensitive information, but for now, I want to check something with you.

I checked the "admin_texts_astra-settings" text domain and could not find any instance where the issue you described happened.

Can you confirm that? If no, may I have an instance that you have an issue with that specific text domain?

The workaround mentioned in the errata was specifically for scenarios that the Appearance > Customizer option is used. That is why the fix should handle the "admin_texts_astra-settings" text domain.

But for the "admin_texts_*******_user_roles" text domain I need to know which plugin options are that. Is it the B2B Market plugin? Or is it something else?

Thanks.

November 15, 2024 at 9:57 am #16406971

johannesB-16

Hi,
the first 3 attachements are showing the strings from B2B Market plugin. They are the name of user roles.
In picture 1 you can see the Italien strings are pointed to EN and DE. Then I changed the language of the strings and now the connection of the strings to their language is right (although now French and German are shown) but both strings needs an update for their translation.
After I hit the update button, strings appear like it's shown in picture 3.

'admin_texts_astra_settings' attachement shows the strings of the customizer, which originally were all set in the same language (German). After a while, they were mixed up, like it is shown in the screenshot.
Right now it is working, but as a mentioned before, this issue occurs randomly and I'm not able to relate it to another action.

Please note that during this whole process the workaround (https://wpml.org/errata/admin-strings-replaced-by-translations-after-visiting-the-customizer/) was activated but didn't had any posive effect.
For now, the workaround is deactivated since it productes a lot of warnings and my serverload is very high at the moment.

Kind regards

admin_texts_astra_settings.png
b2b-market-strings_2.png
b2b-market-strings_3.png
b2b-market-strings.png
November 18, 2024 at 8:57 am #16413456

johannesB-16

Hi,

last friday I have corrected the mixed strings from the 'admin_texts_astra_settings'.
This morning they again were mixed up (see attachement) without having changed anything in the customizer.

However, I've cloned my website to a staging enviroment and deleted all user data. So you could now copy this page to your server for further investigation.

Kind regards

German_mixed.png
November 18, 2024 at 4:00 pm #16415722

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi,

Thank you very much, I will report this after copying the website, but before that, would you please test by going to Users > Profile and changing the dashboard language to English?

I did that and checked the Astra-related test and it seems to be working ok.

Is this something that is happening on your user too?

Screenshot 2024-11-18 at 8.00.37 PM.png
November 21, 2024 at 6:53 am #16427357

johannesB-16

Hi,
I've changed the profile language but the issue with the user roles remains.
However, I can't say if the change of language is affecting the customizer strings.

user_roles.png
settings.png
November 21, 2024 at 2:34 pm #16429639

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Thank you very much. I will consult with the second tier support to see what might be the problem cause and will get back to you.

It might take time and I appreciate your patience.

Thanks.