-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Magento 2 sitemap wrong paths in sitemap index when running on cron #19565
Comments
Hi @key-dev. Thank you for your report.
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
where @key-dev do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
Hi @engcom-backlog-nazar. Thank you for working on this issue.
|
Hi there, |
HI @key-dev they don't have matter if you use nginx or apache, the problem with pub folders. |
Hi @engcom-backlog-nazar so if my sitemap.xml index file has these sitemaps in it. https://www.site.com/public_html/sitemaps/sitemap-1-1.xml2018-12-04T15:44:59+00:00 https://www.site.com/public_html/sitemaps/sitemap-1-2.xml2018-12-04T15:44:59+00:00 https://www.site.com/public_html/sitemaps/sitemap-1-3.xml2018-12-04T15:44:59+00:00 https://www.site.com/public_html/sitemaps/sitemap-1-4.xml2018-12-04T15:44:59+00:00 https://www.site.com/public_html/sitemaps/sitemap-1-5.xml2018-12-04T15:44:59+00:00 https://www.site.com/public_html/sitemaps/sitemap-1-6.xml2018-12-04T15:44:59+00:00 https://www.site.com/public_html/sitemaps/sitemap-1-7.xml2018-12-04T15:44:59+00:00 https://www.site.com/public_html/sitemaps/sitemap-1-8.xml2018-12-04T15:44:59+00:00 https://www.site.com/public_html/sitemaps/sitemap-1-9.xml2018-12-04T15:44:59+00:00 https://www.site.com/public_html/sitemaps/sitemap-1-10.xml2018-12-04T15:44:59+00:00 https://www.site.com/public_html/sitemaps/sitemap-1-11.xml2018-12-04T15:44:59+00:00 https://www.site.com/public_html/sitemaps/sitemap-1-12.xml2018-12-04T15:44:59+00:00Now 2 issues in it |
I'm also having this same issue, some times magento auto generating with the wrong paths by adding public_html along with the store url. Please i need a solution for this. |
Hi, @engcom-backlog-nazar I can't understant the solution, can you please explain and post here.? |
Hi @ask694 You need to add appEmulation in
|
Hi @magento-engcom-team This fix not worked for me. i had changed the code directly to the core module. Any other solution.? still i'm getting the public_html on the sitemap xml |
HI @ask694 you can recheck on 2.3-develop branch |
Hi @magento-engcom-team , I'm having the same problem with Magento 2.2.3. I have set pub as a document root and my sitemap folder is in html/pub/. When generated by cron, the sitemap.xml file contains url like this: But when generated manually through Admin They are : http://mysite.com/sitemap/sitemap-1-1.xml Any solution? |
@ghatamehta: as a test, can you try to follow this advice?
And see if that solves your problem? I haven't tested the above solution yet, but we used to solve this problem by setting the base media url's configuration as follows, which also fixes this problem: Stores => Configuration => General => Web:
But I'm more in favor of the first solution, it looks cleaner to me. |
Hi @hostep , Thank you for replying. I already have added these solutions but I have over 100000 pages. So my sitemaps are divided into parts. The sitemap index file contains URLs like http://mysite.com/html/pub/sitemap/sitemap-1-1.xml which are not correct. |
My sitemaps are also experiencing this behavior where they are split into multiple files with the main sitemap.xml incorrectly including "public_html" in the child paths. But, the problem seems to only occur when I manually update the sitemap through the admin panel. If I use netz98's "magerun" to generate the sitemaps (via Using v 2.3.2 |
Preconditions
Steps to reproduce
Add a sitemap with a path of /sitemaps/
Allow cron to generate the sitemap
Expected result
sitemap.xml index urls to sitemap should be https://site.com/sitemaps/sitemap-1-1.xml
Actual result
Sitemap.xml urls look like: https://site.com/public_html/sitemaps/sitemap1-1.xml
If I generate the sitemap through the Magento2 admin, the urls appear as they should.
Moreover after sometime sitemap-1-1.xml gets removed from the sitemaps folder. And never comes back while running on cron.
The text was updated successfully, but these errors were encountered: