Support » Plugin: The SEO Framework » WPML: sitemap does not add the language string in URLs

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Sybre Waaijer

    (@cybr)

    Hello 🙂 I’m glad you’re still around!

    Could you check if those pages have their languages tagged correctly via WPML? I notice only a few posts are affected by this issue.

    Please note that there are two sitemap versions–one for English, and one for Dutch:
    https://becode.org/sitemap.xml
    https://becode.org/nl/sitemap.xml

    The Dutch version shows those links correctly. So, I’m led to believe the posts in question have extraneous/erroneous language metadata attached.

    Thread Starter pixeline

    (@pixeline)

    Hello Sybre 🙂

    I double-checked: the pages are correctly marked as “nederlands”.

    I have another question: why is the sitemap limited to 45 pages when I have 98 pages in total ?

    https://www.dropbox.com/s/6l4bdna4bxasaaq/Capture%20d%27%C3%A9cran%202020-06-03%2013.05.45.png?dl=0

    Thread Starter pixeline

    (@pixeline)

    I see there is the 2.4.0 version available. I’ll test and report back if it solves the issue or if it continues.

    update: nope, the issue remains.

    • This reply was modified 1 year, 6 months ago by pixeline.
    • This reply was modified 1 year, 6 months ago by pixeline.
    Plugin Author Sybre Waaijer

    (@cybr)

    Hello!

    I published a KB article just this morning, where I explain why each locale has a unique sitemap, and the usage of WPML + TSF in general: https://kb.theseoframework.com/kb/translation-plugin-compatibility/.

    For your site, here you can find the respective locale’s sitemaps:
    English sitemap: /sitemap.xml
    Dutch sitemap: /nl/sitemap.xml
    French sitemap: /fr/sitemap.xml

    The Dutch and French sitemaps look good to me.

    Now, the English (default) sitemap has a few extraneous posts listed from the other languages, which are displayed in both the English as their lingual-specific sitemaps. This is what I was aiming for in my previous reply.

    Below you find an overview of the incorrectly listed posts I was able to find. I’d like you to check in on those posts’ settings (again), and see if they have their WPML options set correctly. And perhaps, saving the posts again will correct their language settings.

    The goal is that each sitemap only contains posts from its language so that the broken links (and their 404 errors) go away.

    Extraneous Dutch posts:

    /kennismaken/
    /leren/junior-web-development/
    /over-ons/campussen/charleroi-campus/
    /over-ons/campussen/gent-campus/
    /over-ons/campussen/liege-campus/
    /over-ons/campussen/antwerpse-campus/

    Extraneous French posts:

    /apprendre/
    /apprendre/ai-bootcamp/

    This one’s displayed in the English sitemap only, while it should be in the French one:

    /a-propos-de-nous/nos-campus/campus-de-gand/
    

    Unfortunately, from here, I can’t tell why these misarrangement issues are happening on your site. If we can’t work it out with the information I’ve given thus far, then I recommend talking to the folk at WPML. They know the ins-and-outs of how WPML handles post queries much better than I 🙂 Then, if you will, please report back with the solution they’ve given. Thank you!

    Thread Starter pixeline

    (@pixeline)

    Thank you @cybr for your thorought reply!
    Will triple check, eventually directly in the Database to understand how this.

    Would that solve the “weird number of items in the sitemap” issue too ?

    • This reply was modified 1 year, 6 months ago by pixeline.
    Plugin Author Sybre Waaijer

    (@cybr)

    No problem 🙂 Keep me posted and make a back-up of your database before you perform queries!!

    It’s best to use the admin interface, though, because when that doesn’t work, it’s indicative of a bug we must resolve.

    Now, when all posts have their language-settings corrected, the numbers should add up again. Typically, a sitemap would, for each language, have this tallied:
    homepage + page for posts + number of indexable posts/pages/cpt for that language.

    For completeness, that number is capped at 50,000 posts per sitemap, and that number should be at most: ( (sitemap query limit * 2) + homepage + page for posts ).
    The “* 2” is because TSF queries posts and pages separately.

    Thread Starter pixeline

    (@pixeline)

    @cybr you were totally right: some weird stuff happened and I didn’t see it at first. We also use Divi builder alongside WPML (and TSF). Both tweak the UI so much that there is some confusion for our translators, so bogus pages where created. In fact all those errors in the English sitemap can be deleted. They are not the correct ones.

    We can safely close this issue as resolved 🙂

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘WPML: sitemap does not add the language string in URLs’ is closed to new replies.