This thread is resolved. Here is a description of the problem and solution.
Problem: You are using the Better Search Replace plugin, which is compatible with WPML, to replace words across different language pages on your site. However, after using the plugin, the changes are visible on the English and Belgian pages, but the Classic Editor still shows the old content. Solution: The issue arises because the plugin modifies the database directly, which does not trigger the necessary WordPress hooks to update the Advanced Translation Editor (ATE). Unfortunately, WPML does not have a built-in tool to address this directly. However, we recommend updating your posts programmatically as a workaround. This method has not been fully tested by us and is not officially supported by WPML, so please ensure you have a full website backup before proceeding. For guidance on how to update posts programmatically, you can refer to this document: https://wordpress.stackexchange.com/questions/330746/how-can-i-mass-update-save-all-wordpress-posts-and-pages.
Please note that this solution might be outdated or not applicable to your specific 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 this does not resolve your issue, please open a new support ticket at our support forum.
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:
I am using Better Search Replace, which was said to have been compatible with WPML (https://wpml.org/plugin/better-search-replace/). I am testing this plugin on the BSR Testing page to replace a word across different language pages on my site hidden link. In the attached images, I used BSR to replace "hidden link; with "hidden link;.
Symptoms:
When I replace a word, it updates on the English, Belgian, and other pages, but the translation editor (Classic Editor) still shows the old content.
Questions:
Is there an easy way to make WPML re-sync without having to manually update each page in the original language and confirm changes in every language? Otherwise, is a different solution to this problem?
1. Changed the translation editor to the Classic Translation Editor
2. Created a page called "BSR Testing"
3. Added some text to the page "BSR Testing". The text I am planning to replace is "AlexWasHere"
4. Create a German translation with near identical text.
5. Downloaded the plugin "Better Search Replace" and activated it.
6. Went to Tools -> Better Search Replace
7. Search for: AlexWasHere | Replace With: BSREditedThisText | Select Tables: All tables | Checked "Case-Insensitive", "Replace GUIDs" and unselected "Run as dry run".
Result:
During the search/replace, 34 tables were searched, with 3 cells changed in 3 updates.
wp_posts 3 3 0.021 seconds
8. On the BSR Testing page, the text "AlexWasHere" was successfully replaced with "BSREditedThisText" in both the English and German language.
9. On the Classic Editor Translator from English to German, the text displays as "AlexWasHere" still.
Following the same steps as I did for Classic Translation Editor, but this time with the settings set to Advanced Translation Editor, the result was still the same.
I got feedback from our devs. The logic to update the ATE is triggered when we save/update the post. As this plugin is modifying the database directly, these hooks are not triggered. This applies to any WP hook, so it may affect other plugins too, not just WPML. Unfortunately, we don't have any tool inside WPML to address this.
Nonetheless, I have a non-official solution to recommend. I cannot guarantee it will work, because it's not been fully tested by us and is not 100% related to WPML. You can update your posts programmatically. Make sure to have a full website backup before performing any of the steps. Here is a document that might be helpful: https://wordpress.stackexchange.com/questions/330746/how-can-i-mass-update-save-all-wordpress-posts-and-pages