• Resolved andresmolina

    (@andresmolina)


    Hi,

    I use your XML sitemap generator, for being the best out there, so first of all congrats and thanks for sucha a good plugin.

    The questions that concerns me right now is the following:

    I have a 2 languages websites with WPML plugin (EN & ES).

    The plugin generates both sitemaps separately with no problem:

    https://www.xxx.com/sitemap.xml (english sitemap, for being default lang)
    https://www.xxx.com/es/sitemap.xml (Spanish version)

    The tricky part comes here. The Spanish language of the website, does not have blog, and so it does not have posts. But the Spanish sitemap shows page-post.xml, which is fine, except that because it is empty inside, webmastertools says NO XML TAG PRESENT error.

    So I will like to ask, is there any way to specify to do not create the page-post.xml on the spanish version of my sitemap? Is there a way make it insert the XML tag even when it is empty inside?

    Thanks
    Kind regards

    https://www.ads-software.com/plugins/xml-sitemap-feed/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Hmmm, this is a tough one… Because your site does contain posts the plugin assumes a posts sitemap will be present and adds the URL to the index. But the plugin cannot detect if there are no posts in any specific language with WPML.

    With Polylang there is no problem because all languages end up in one sitemap but with WPML the languages are split across different sitemaps. This is not by design, just how the two plugins interact at present.

    There’s a user Hermes who submitted a patch for (better) WPML compatibility here https://www.ads-software.com/support/topic/xml-sitemap-feed-wpml. The patch is implemented on https://github.com/RavanH/xml-sitemap-feed/tree/WPMLcompat or https://github.com/hermes3por3/xml-sitemap-feed/tree/wpml-support (you’d have to Download Zip then extract and upload the files via FTP to your site) but I don’t think it solves your particular issue.

    A discussion is here on https://github.com/RavanH/xml-sitemap-feed/pull/2 where we are trying to further improve WMPL compatibility. Your case is an interesting one that needs to be addressed.

    Adding empty XML tags will not solve the issue, it will just change the error to something else (saying there are empty/invalid XML tags) so at present, I only see one solution: create at least one post in Spanish…

    Thread Starter andresmolina

    (@andresmolina)

    Hi Ravanah,

    I dont see you are really convicend about installing the beta version in github.. heheheh, but to be honest i highly doubt this will fix the problem, as this github thing wasnt created to my specific problem… This is really something I would begg you to look into.. I can give you access to the site etc… please please please XD

    Im not a programer but i do understand how development more or less works. So why is it so complicated to detect if that url actually exists in spanish? I mean… It is not even dissabled post, it is simply not there…

    Thread Starter andresmolina

    (@andresmolina)

    I see you posted on that github group. Thanks a lot, I will wait to see if you guys can fix it.

    Im not a programer but i do understand how development more or less works. So why is it so complicated to detect if that url actually exists in spanish? I mean… It is not even dissabled post, it is simply not there…

    In itself it should not be that complicated but I’m working in the dark here (I don’t have WPML) plus it brings along a lot of complication in the future. The code inside my plugin will suddenly depend on one specific other plugin and I’ll need to keep it up to date and compatible forever. Plus I need to make sure it does not hurt any other scenarios like sites that use another language plugin. And all that while I don’t even use WPML myself!

    I use Polylang for a lot of projects and since that plugin is extremely well made and heavily relies on WordPress own internal functions, it’s easy for me to keep the sitemap plugin compatible. WPML is a completely different story… I tried this for qTranslate a long time ago but after the n-th time compatibility broke, I had to give it up.

    So what I’m leaning towards is adding some specific hooks and filters so either a third (party) plugin can be built or WPML developers can use them to make their plugin compatible. They are paid for it after all. ??

    That said, I’m not against adding some code that is easy to maintain and does not hurt cases where other or no language plugins are used.

    Hope that explains my motivations a bit ??

    Thread Starter andresmolina

    (@andresmolina)

    Hey!

    First of all thanks for your response and time and efforts…

    Just to try to throw some light into this in plain words (not programing words), I can see there are 3 ways we could do this:

    1. By making the plugin crawl its own sitemap and checking if the page delivers to a 404 page, so that way you can implement an option to exclude all 404 linked pages.

    2. Probably the most complicated one, as i guess this will need a propper integration with wpml. By enabling a check (just like it is right now) on each post to exlcude it from the sitemap, but enable it in all diferent languages, or even on the default language to let you choose which languages dont.

    3. Probably the easiest and hassle free one, by letting us specify certain URLs′s to exclude from all the sitemaps. That way if my url for the spanish blog is /es/blog/article then i will use a /es/blog.* (regex). So it will dissable all the articles in that language. And that could be use not just with blog articles, but products, pages, etc.

    PD: And as a more comftable solution between the 2nd and 3rd described options, to enable in the default language of pages and post a custom exclude this from search engines. So I can input the url (regex) of the page/post I’m in.

    Thanks
    Kind regards

    Thanks for your thoughts. I like your 3rd suggestion much because it’s an enhancement that can serve more cases than only WPML. It’s going on the feature request list for sure! ??

    Thread Starter andresmolina

    (@andresmolina)

    Just bear in mind that I did the 3.5 suggestion (the PD) because it will be usefull to do not have to go to the reading settings under general tab to include this exclussion.

    You see.. im not programmer, im just a … gramer (that sounds auful).. but what I′m trying to say is i dont know how to make it, but i know it can be done and i know how would be a good way to implement it… ??

    Not russing you or anything like that, dont get me wrong.. i just want to know if this could be on the next release or we will have to wait for longer, basically becuase i want to take action on this “problem of me” asap, and i want to know how would I be able to know you released this feature.

    Thanks once again

    Thread Starter andresmolina

    (@andresmolina)

    sorry repeated post

    PD: And as a more comftable solution between the 2nd and 3rd described options, to enable in the default language of pages and post a custom exclude this from search engines. So I can input the url (regex) of the page/post I’m in.

    I’m not following… There’s already a check box to exclude individual posts from the sitemap.

    i just want to know if this could be on the next release or we will have to wait for longer, basically becuase i want to take action on this “problem of me” asap

    Like I said, the fasted (immediate!) solution would be to publish at least one post in each language.

    Hi @andresmolina – version 4.7+ should be fully compatible with WPML. Please let me know if you find any issues ??

    Thread Starter andresmolina

    (@andresmolina)

    Hey man,

    Sorry for being a bit out of this thread for too long.

    I have to say congrats for it, you are doing the good thing. Unfortunetely i have changed now my sitemap plugin, but do not heasitate i will tell everyone about your fantastic and updated plugin.

    Thanks
    Kind regards

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘XML sitemap and WPML’ is closed to new replies.