Hey guys,
I got an issue with generating sitemap.xml in Magento CE 2.2.2
I just created 3 sitemaps, one for each store view (language). It worked out fine, except the image and thumbnail URLs. It looks like that:
So I always get that https://mydomain.de/pub/media piece in front of the (well, at least a bit) right URL. I didn`t change base URL for media configurations.
Does anyone have an idea about what´s wrong?
Facing same issue in magento 2.3.0
Facing the same issue in Magento 2.3.4
Has anyone fixed it yet? Any suggestions?
I've just come across this on 2.3.5. I'll see what I can find
In Model/Sitemap.php, _getMediaUrl() method is used and generates a wrong image url.
This method is deprecated and should not be used anymore.
Instead of
htmlspecialchars($this->_getMediaUrl($image->getUrl()))
just use
htmlspecialchars($image->getUrl())
_isEnabledSubmissionRobots() and _addSitemapToRobotsTxt() methods are also deprecated and will be removed.
Hope it helps !
Problem Solved ? Click on 'Kudos' & Accept as Solution to encourage to write more answers !!Thank you