We’re rewarding the question askers & reputations are being recalculated! Read more.
3

The reason is the way getBaseUrl function implemented on Magento\Store\Model\Store. public function getBaseUrl($type = UrlInterface::URL_TYPE_LINK, $secure = null) { ... case UrlInterface::URL_TYPE_MEDIA: $url = $this->_getMediaScriptUrl($this->filesystem, $secure); if (!$url) { ...


2

sometime problem happens when running the sitemap generation through bin/magento cron:run from outside of the magento directory. e.g our magento code is in /var/www/src, if I run php src/bin/magento cron:run from /var/www the urls will contain src as part of the baseurl. Running from the magento directory, e.g php bin/magento cron:run from /var/www/src, ...


1

Media directory is always in "pub" and the actual result is correct but when you want to browse it, you don't need to put "pub" in the URL. Try the direct URL: https://magento-site/media/sitemap-1-1.xml bydefault, magento .htaccess or nginx.sample file works like there is no need to put "pub" in the url but all the files and folders reside in "pub" folder ...


1

I tracked down the exact problem code line. It is inside the function getCollection() from the class Mage_Sitemap_Model_Resource_Catalog_Category: public function getCollection($storeId) { /* @var $store Mage_Core_Model_Store */ $store = Mage::app()->getStore($storeId); if (!$store) { return false; } $this->_select = $...


1

There was an error in your SQL: AND url_rewrite.category_id IS NOT NULLurl_rewrite.id_path LIKE 'category/%' should looks like: AND url_rewrite.category_id IS NOT NULL AND url_rewrite.id_path LIKE 'category/%' Possible there was some kind of modifications made by some third-party observer. Take a look at modules installed in your system and check all its ...


1

-> I solved this problem same issue I getting my store. Please follow below step. -> 1. Please make a custom folder in your root. (ex:- sitemap and yes please give full permission to this folder (chmod -R 777 sitemap)) -> 2. log in your admin panel and following this path.(Marketing->SEO & Search -> Sitemap). -> 3. add a new sitemap. please see below ...


Only top voted, non community-wiki answers of a minimum length are eligible