Home›Support›English Support›[Resolved] Conflict of saving wpseo_titles with WPML overwritting in secondary language
[Resolved] Conflict of saving wpseo_titles with WPML overwritting in secondary language
This thread is resolved. Here is a description of the problem and solution.
Problem: The client is experiencing an issue where wpseo_titles are being overwritten in the secondary language when using WPML with the Yoast SEO plugin. This occurs after changes are made in the Yoast settings and the frontend is visited in a secondary language. Solution: 1. Verify if the wpseo_titles custom field is set to be translatable by following the steps in this guide: Translating Custom Fields. 2. If the field is translatable, check for any triggers in the default language that might be overwriting the translation. 3. You can also try translating the wpseo_title value via String Translation. This might require locating it first within the admin texts section as described here: Finding Strings that Don't Appear on the String Translation Page. 4. If translating the value does not resolve the issue, it is likely a compatibility issue between WPML and Yoast SEO, not directly caused by WPML.
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 the problem persists, please open a new support ticket.
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 trying to resolve a conflict between saving wpseo_titles and WPML overwriting in the secondary language. I have posted a bug report to Yoast about this issue: hidden link.
Symptoms:
The wpseo_titles are being overwritten in the secondary language, which is not the expected behavior.
Questions:
Why are wpseo_titles being overwritten in the secondary language?
How can I prevent WPML from overwriting wpseo_titles?
If the custom field is translatable, then we will need to look for a trigger in the default language of the site (where WPML plugins make no changes) that overwrites the translation.
Yes, I understand the issue, but if you translate the value of wpseo_title via String Translation, does the issue persist? I want to make sure the value is correctly translated 🙂
Yes, it’s somewhere in the middle. Perhaps the WPML SEO team could take a look at it, since it suggests that full compatibility with Yoast isn’t there yet.
Ideally, the fix would be for Yoast not to save this variable on the frontend, but that would likely require some significant adjustments to their setup.
I double-checked our documentation and found nothing related to wpseo_title. There are some old tickets, but the issue was resolved after installing WPML SEO.
I wasn't able to reproduce the issue on a clean sandbox.
Env:
WPML CMS 4.9.2
String Translation 3.5.1
WPML SEO 2.2.5
Yoast SEO 27.4
Yoast SEO Premium 27.4
I followed your steps:
1. I translated some wpseo_titles in String Translation: [wpseo_titles]company_name, wpseo_titles]breadcrumbs-prefix, [wpseo_titles]title-page, [wpseo_titles]title-post
2. In Yoast settings I chnaged the Breadcrumbs prefix and saved
3. From there I directly typed the secondary language homepage URL in the navigation bar (I didn't visit the primary language at all)
4. I went back to the backend and checked the Yoast settings and they are still in the primary language.
Here is the auto-login link to the sandbox: hidden link
Could you please try to reproduce on your end? Did I miss a step?
Any settings or configuration that differs from your site?