[Waiting for user confirmation] Posts not updating with translated content
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/
Background of the issue:
I am trying to update URLs in posts, but the changes do not persist. The issue can be seen on this page: hidden link. I have also provided a video illustrating what I see in the backend and what I have done to resolve it: hidden link.
Symptoms:
The content remains in English, and the links within the text are not updating as expected.
Questions:
Why are the URLs in my posts not updating?
How can I ensure the content is translated into French and the links are updated?hidden link
Usually, after migrating the site, you should go to the WordPress Permalink settings and save them again.
This will reset the permalinks of the site and they will use the new site URL.
But when it comes to lanks that are placed directly into the content of pages or posts, means as raw text with HTML, then you usually would need to adjust those links manually.
It is not even really a WPML issues. You usually would experience the same issue on a site running without WPML.
I see Search & Replace plugin seems not to solve the issue.
Maybe you could try to fix the issue with a PHP snippet like this one:
function replace_site_url() {
global $wpdb;
$old_url = '<em><u>hidden link</u></em>';
$new_url = '<em><u>hidden link</u></em>';
$wpdb->query(
$wpdb->prepare(
"UPDATE {$wpdb->posts} SET post_content = REPLACE(post_content, %s, %s)",
$old_url,
$new_url
)
);
}
add_action('init', 'replace_site_url');
Adjust the URLs, then paste it to the functions.php file of your theme. Refresh the website and remove the snippet again.
If this will still not solve the issue, please take note that this is expected WordPress behavior and not a WPML issue.