Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WPML Duplicated language pages URLs are added to the sitemap even having different canonical URL #21015

Open
2 of 11 tasks
josevarghese opened this issue Jan 2, 2024 · 3 comments
Labels
compatibility: WPML Possible conflict with the WPML plugin. component: xml sitemap IM

Comments

@josevarghese
Copy link
Contributor

josevarghese commented Jan 2, 2024

  • I've read and understood the contribution guidelines.
  • I've searched for any related issues and avoided creating a duplicate issue.

Please give us a description of what happened

The duplicated language pages of the WPML are added to the sitemap, even though those pages are added with canonical URLs pointed to the original content page. Due to this, SEO tools like ahrefs and others show this an issue as the URLs of non-canonical pages are added to the sitemap.

To Reproduce

Step-by-step reproduction instructions

  1. Make sure that WPML and WPML SEO plugins are installed and activated on the website

  2. Create a new post and click on the Duplicate page option provided by WPML (https://wpml.org/documentation/translating-your-contents/displaying-untranslated-content-on-pages-in-secondary-languages/) for the creation of other languages
    duplicate

  3. Check the source code of duplicate created language pages; then, you can notice that the canonical URL is pointed to the original content page. Right now, the Yoast and WPML are working correctly, as the content is an exact copy of the original page.

  4. But when we check the sitemap of Yoast generated, we can notice that the duplicate created language page is added to the sitemap, which should not be there as the canonical URL is pointed to another page (the page from which the duplicate page is created).

Expected results

The duplicate created language page with a non-self canonical page should not be added to the sitemap.
Or, the expectation would be like the following if we can enhance it this way:

  • When duplicating a page using WPML, Yoast SEO shall use the canonical pointing to the original page. So, the duplicated page will not appear in the sitemap.
  • When the duplicated page content is modified using a different language, the canonical on the relevant page shall point to self-canonical. So, the duplicated page will now appear in the sitemap.

Slack conversation with more details: https://yoast.slack.com/archives/C02D43TFT/p1666101600499169?thread_ts=1666081013.387359&cid=C02D43TFT

Actual results

The duplicate language page is outputted within the sitemap and the SEO tools like ahrefs may report this more in the future, and the crawl budget may be required more as Google notices these URLs within the sitemap.

Screenshots, screen recording, code snippet

If possible, please provide a screenshot, a screen recording, or a code snippet that demonstrates the bug.

Technical info

  • If relevant, which editor is affected (or editors):
  • Block Editor
  • Gutenberg Editor
  • Elementor Editor
  • Classic Editor
  • Other:
  • Which browser is affected (or browsers):
  • Chrome
  • Firefox
  • Safari
  • Other:

Used versions

  • Device you are using:
  • Operating system:
  • PHP version:
  • WordPress version: 6.4.3
  • WordPress Theme:
  • Yoast SEO version: 21.7
  • Gutenberg plugin version:
  • Elementor plugin version:
  • Classic Editor plugin version:
  • Relevant plugins in case of a bug:
@josevarghese
Copy link
Contributor Author

Comments moved from Jira:

Ramon Bauza
(October 20, 2022 at 12:41 PM)

For me, it’s still unclear whether the canonical tag on the duplicate translated page should point to the original page or to itself. Currently, the canonical points to the original page, and this happens even when Yoast SEO is disabled. According to what was discussed here, the canonical on the duplicate translated page should point to itself, even if the content is identical (the menus on the page could be different).

That said, if the canonical tag on the translated page points to somewhere else (i.e. original post), I’d expect the translated page to be excluded from the sitemap, and this is currently not happening.

Old bug report in GitHUb: Wrong canonical when WPML duplicates page · Issue #7059 · Yoast/wordpress-seo

@josevarghese
Copy link
Contributor Author

Please inform the customer of conversation # 986857 when this conversation has been closed.

@josevarghese
Copy link
Contributor Author

Please inform the customer of conversation # 948564 when this conversation has been closed.

@josevarghese josevarghese added IM compatibility: WPML Possible conflict with the WPML plugin. component: xml sitemap labels Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility: WPML Possible conflict with the WPML plugin. component: xml sitemap IM
Projects
None yet
Development

No branches or pull requests

1 participant