Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
After a recent update, the video sitemap on your website incorrectly uses hreflang='cn' for Chinese instead of the correct hreflang='zn'. This error is causing issues with the Chinese version of your site.
Solution:
We have addressed this issue in the latest version of WPML SEO. First, ensure you back up your entire site. Then, update your WPML SEO to the latest version, which is WPML SEO 2.2.3. You can download the update from here. After updating, please verify that the hreflang attribute is corrected in your video sitemap.

If this solution does not apply to your case, or if it seems outdated, we recommend opening a new support ticket. Additionally, 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. For further assistance, please visit our support forum at WPML 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.

Tagged: 

This topic contains 5 replies, has 0 voices.

Last updated by Noman 6 days, 14 hours ago.

Assisted by: Noman.

Author Posts
August 5, 2025 at 8:23 am #17295344

alinaC-9

Background of the issue:
I’ve noticed that after the latest update, my website's video sitemap got hreflang links. The Chinese hreflang is wrong; it uses hreflang='cn' instead of hreflang='zn' according to the hreflang standard. Full line:

Symptoms:
The Chinese hreflang is incorrect, causing issues with the Chinese version of my site.

Questions:
Why is the Chinese hreflang incorrect after the update?
How can I fix the hreflang issue in the video sitemap?

August 5, 2025 at 5:31 pm #17297543

Noman
WPML Supporter since 06/2016

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

I created a fresh WP site and installed WPML plugins. Could you please try to replicate the issue by following the below steps:

1. Login to the fresh WP site by clicking on the auto login URL:
hidden link

2. Install the Rank Math SEO Pro plugin and configure it as you did on your site.

3. Add the Chinese language as you did on your site.

4. Create a test page with Video and in the default language and try to translate it.

Please note that we only need above mentioned plugin functionality, you don't need to set up an entire website or clone your existing site.

Please let us know the results,
Thank you for your cooperation

August 6, 2025 at 7:57 am #17298693

alinaC-9

Hi Norman,

I followed your instructions exactly. When adding Chinese language I stated hreflang = "zn" and Code = "zh-hans" intentionally making them different as at my website.
And after adding video post at Chinese I can see that there is the same error. At video sitemap hreflang is taken not form language hreflang but from Code.
Please find screenshots attached.

Снимок экрана 2025-08-06 095624.jpg
Снимок экрана 2025-08-06 095646.jpg
August 7, 2025 at 9:22 am #17301881

Noman
WPML Supporter since 06/2016

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thanks for replicating the issue. It seems the Video Sitemap is using the language code instead of the hreflang value across all languages. I tried updating the hreflang for English and French, but the sitemap still uses the code.

I also tried some troubleshooting steps, but no luck so far. I’m escalating this to our 2nd tier support team and will keep you posted with any updates.

Thanks again for your patience and cooperation

August 10, 2025 at 8:21 am #17307319

Noman
WPML Supporter since 06/2016

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Sorry for the delay, I was off during the weekend (Friday-Saturday). Could you please take a backup of your site and follow the suggested workaround from this errata: https://wpml.org/errata/wpml-seo-incorrect-hreflang-value-in-sitemaps/ and see if this resolves the issue.

I just tested on a fresh WP site and it seems to work correctly now. Could you please check and confirm?

Thank you for your cooperation

August 13, 2025 at 3:01 pm #17318277

Noman
WPML Supporter since 06/2016

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

We’ve recently released WPML SEO 2.2.3, which includes a fix for this issue: https://wpml.org/download/yoast-seo-multilingual/?section=changelog

Please take a full backup of your site and then update WPML SEO to the latest version. Once updated, check if the issue is resolved.

Let me know how it goes.
Thank you for your cooperation