Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Chouby

    (@chouby)

    What’s wrong with Google XML Sitemaps?

    Thread Starter Baz11

    (@baz11)

    I use Google XML Sitemaps v3.2.8. When I adding new posts in other languages ??(non-default) they are not added to the XML sitemap. Format of permalinks – https://site.com/post.html. When I use format of permalinks – https://site.com/en/post.html post are added to XML sitemap without “en/”.

    Plugin Author Chouby

    (@chouby)

    I made tests and observed this:

    1. When the language is set form the content -> no problem
    2. When the language code is added to all urls:
    * if the sitemap is generated manually -> no problem
    * if the sitemap is generated after creating a new post -> all urls are wrong.

    I don’t know why Google XML Sitemaps does call permalinks filters in one case, and not in the other…

    From my experience, even if there are still some things which not work correctly with WordPress SEO, the sitemaps generated by WordPress SEO are correct.

    I recently ran into this problem and also poked around a little and had the same observations. So i dug around Google XML Sitemaps’ code and found out some interesting things.

    Note: Please double check the following things since I’m a Jr php developer and might be wrong in some way.

    First of all. The generation breaks only when the sitemap is generated in a background process (the checkbox in the plugin settings is selected).

    So I poked around a little more and found out that the Sitemaps plugin uses the WP-Cron to schedule the XML build 15 seconds after a post has been saved. What I believe to be the cause of the problem is that by the time the scheduler calls the script, the execution of the current one is finished and Polylang’s hooks do not fire.

    Again: I could be off here, but in case I’m not … I hope this has been a helpful hint as to what the underlying problem is. I’m not sure if there’s a way to fix it in some future release, but if there is I’d really appreciate it since it would save me a lot of headaches. ??

    Plugin Author Chouby

    (@chouby)

    Thank you for pointing me to the right direction. The cron process stops before Polylang adds its filters. This specific issue will be solved in v1.0.

    However, the compatibility between both plugins won’t be perfect and I fear I can’t do nothing to solve this. There will still be issues with homepage, archives and author pages.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: Polylang] xml sitemap problem’ is closed to new replies.