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.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 17:00 10:00 – 17:00 10:00 – 17:00 10:00 – 17:00 10:00 – 17:00 -
- 18:00 – 19:00 18:00 – 19:00 18:00 – 19:00 18:00 – 19:00 18:00 – 19:00 -

Supporter timezone: Asia/Kathmandu (GMT+05:45)

Tagged: 

This topic contains 4 replies, has 1 voice.

Last updated by Shekhar Bhandari 5 hours, 6 minutes ago.

Assisted by: Shekhar Bhandari.

Author Posts
December 23, 2024 at 7:02 pm #16541419

orO

Background of the issue:
I have created a translation for 'HTML 5' custom string that you can use in the Flatsome builder. At first, it worked fine, and I saw the translation on the translated website and the original text in the original Hebrew language. Link to a page where the issue can be seen: hidden link

Symptoms:
The translated English text appears in both the original Hebrew version of the website as well as in the translated version. The original text was replaced with the translation, overriding it, and it is now lost.

Questions:
Why is the translated text appearing in both the original and translated versions?
How can I restore the original text that was replaced by the translation?

December 23, 2024 at 7:57 pm #16541898

orO

After I rewrote the original text and saved it all worked for a while, but then again, for the second time, suddenly the original text was overridden by the translation at its source, leaving both languages with the translated text.

So this is not a one time thing, this is constant.

December 24, 2024 at 8:05 am #16542841

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+01:00)

Hi,

Thank you for contacting WPML support!

It seems the issue you’re experiencing might be related to a known problem where translations of admin strings replace the original text after visiting the WordPress Customizer. You can find more details here: https://wpml.org/errata/admin-strings-replaced-by-translations-after-visiting-the-customizer/

As a workaround, please follow these steps:

1. **Backup Your Site**
Ensure you have a full site backup before proceeding to avoid any unintended changes.

2. **Edit the `wpml-admin-texts.class.php` File**
- Open the file located at `…/wp-content/plugins/wpml-string-translation/inc/admin-texts/wpml-admin-texts.class.php`.
- Locate line 214.

3. **Replace the Code**
Replace this line:

 $isAdmin = is_admin() && ! wpml_is_ajax();  

With this:

   $isAdmin = is_admin() && ! wpml_is_ajax() || ( isset($_REQUEST["wp_customize"]) && $_REQUEST["wp_customize"] == "on" ) || ( isset($_POST["screen_id"]) && $_POST["screen_id"] == "customize");  

If you encounter any issues or need further guidance while applying this workaround, please let us know, and we’ll assist you further.

Best regards,

December 24, 2024 at 1:20 pm #16543868

orO

Hello,
But this fix will be overridden as soon as a new version is released for your plugin. This is not a viable way to implement such a fix.

December 24, 2024 at 1:40 pm #16543902

orO

Anyway, I did exactly what you said, but it did not solve the issue. It is the same.

December 26, 2024 at 9:12 am #16546453

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Thank you for contacting WPML support. I'd be happy to assist you on this issue.

To debug this issue further, I would need to check your site settings once, for this I would need temporary access (wp-admin and ftp) to your site.

So could you please provide me with those details, you will find the needed fields for this below the comment area when you log in to leave your next reply.
hidden link

This info is private and available to you and WPML supporters only.
Read more about this: https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

Note:
Backup your sites before providing the credentials or if possible provide credentials for the test site

Look forward to your reply.

Thanks

December 30, 2024 at 9:51 am #16552685

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there

I see the string is showing correctly on the test site, is there any steps I should perform to replicate the issue?

Look forward to your reply.

Thanks

December 30, 2024 at 10:04 am #16552731

orO

Hello,
In order to trigger the issue you need to change something at Flatsome.
You can go to Flatsome>Advanced and change the custom CSS and save.

That would trigger the overwrite of the original header text by the English Translation.

December 31, 2024 at 4:16 am #16554916

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

The issue is happening as your profile language is different then the original language, as a workaround please follow the below steps:

1. **Backup Your Site**
Ensure you have a full site backup before proceeding to avoid any unintended changes.

2. **Edit the `wpml-admin-texts.class.php` File**
- Open the file located at `…/wp-content/plugins/wpml-string-translation/inc/admin-texts/wpml-admin-texts.class.php`.
- Locate line 214.

3. **Replace the Code**

$isAdmin = is_admin() && ! wpml_is_ajax();

With this:

$isAdmin = is_admin() && !wpml_is_ajax() 
|| (isset($_REQUEST["wp_customize"]) && $_REQUEST["wp_customize"] == "on")
|| (isset($_POST["screen_id"]) && $_POST["screen_id"] == "customize")
|| (isset($_POST["action"]) && $_POST["action"] == "of_ajax_post_action");

I will also like to update you that, this is escalated to our developers, I will update you as soon as I will receive any feedbacks from the developers team.

Thanks

December 31, 2024 at 3:38 pm #16556120

orO

Hello,
But this fix will be overridden as soon as a new version is released for your plugin. This is not a viable way to implement such a fix.

Flatsome is the most popular WP theme, you should fix this in your core version.

January 1, 2025 at 8:02 am #16556602

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Yes, I understand. as mentioned earlier, I have escalated this to our developers already.

I will update you further when I have feedback from the developers.

Thanks

January 8, 2025 at 2:18 pm #16573893

orO

Hello,
Are there any news?

January 9, 2025 at 11:10 am #16577207

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

I don't have any update as of now. The ticket is still in our developers queue.

I will update you as soon as I will receive any further feedback.

Thanks