← Back to Multi-lingual SEO & Sitemap Support
Hello! Thank you for your plugin!!! The only thing is, that my sitemap.xml has not markup. I cant find any error or something! May you can help with this! Thanks a lot
Yes, this is a known issue. The sitemap follows the recommendations from google https://support.google.com/webmasters/answer/189077?hl=en&visit_id=636866786973497523-1860492156&rd=1. I tried to solve this problem following the accepted solution in this stackoverflow link: https://stackoverflow.com/questions/51923627/xml-sitemap-rendering-as-plain-text, but when I did it, google didn't accept the sitemap. So yes it's an open issue. If anyone knows how to solve it, the repo is totally open to pull requests :)
Hello! I think I have found the error.
you have this code in your models/sitemap.php
protected function makeUrlSet()
{
if ($this->urlSet !== null) {
return $this->urlSet;
}
$xml = $this->makeXmlObject();
$urlSet = $xml->createElement('urlset');
$urlSet->setAttribute('xmlns', 'https://www.sitemaps.org/schemas/sitemap/0.9');
$urlSet->setAttribute('xmlns:xhtml', 'https://www.w3.org/1999/xhtml');
$urlSet->setAttribute('xmlns:xsi', 'https://www.w3.org/2001/XMLSchema-instance');
$urlSet->setAttribute('xsi:schemaLocation', 'https://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd');
return $this->urlSet = $urlSet;
}
I have changed the URL's to https and now i works fine for me.
Unfortunately, the https fix is not correctly parsed by google search console so I had to remove it :(
I got exactly the same error. Strange I looked, you made changes, but still there was the same problem. I have now changed in the file models/Sitemap.php In method generateSitemap($protocol = 'https') http to https And of course replaced the property protected $protocol = 'https'; http to https Everything works fine
Hi Publipresse, do you see this sitemap https://utopigstudio.com/sitemap-debug.xml as raw text? I see it perfectly in firefox and chrome also
1-9 of 9