WordPress.org

Ready to get started?Download WordPress

Forums

Polylang
xml sitemap problem (6 posts)

  1. Baz11
    Member
    Posted 1 year ago #

    Your plugin is great, but problem with xml-sitemap is great too. XML & Google News Sitemap Feeds is only one alternative, but it has its own questions. Plaese make Your plugin compatible with Google XML Sitemaps and it will be the best.

    http://wordpress.org/extend/plugins/polylang/

  2. Chouby
    Member
    Plugin Author

    Posted 1 year ago #

    What's wrong with Google XML Sitemaps?

  3. Baz11
    Member
    Posted 1 year ago #

    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 - http://site.com/post.html. When I use format of permalinks - http://site.com/en/post.html post are added to XML sitemap without "en/".

  4. Chouby
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  5. Nerdvous
    Member
    Posted 1 year ago #

    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. :)

  6. Chouby
    Member
    Plugin Author

    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.