Sitemap: Wrong XHTML namespace declaration? (Multilang Setup)
moefuerst opened this issue · comments
I am testing this plugin in a multilang setup and got a complaint from the Google Search Console about a wrong namespace declaration in the Sitemap.
I think the issue is the XHTML namespace declaration in line 34 of src/Sitemap.php
:
Currently:
$root->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xhtml', 'http://www.w3.org/1999/xlink');
Should be
$root->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xhtml', 'http://www.w3.org/1999/xhtml');
After I corrected this, the map was accepted as correct.
Reference: developers.google.com/search/docs/specialty/international/localized-versions#sitemap.
@moefuerst Thanks for the hint. Fixed it and created a new release. :-)
@fabianmichael Thanks for the fast fix and sorry I didn't have a PR ready! Great plugin, not only because of it's functionality but also as an educational resource for Kirby plugin development…