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