Closed (duplicate)
Project:
XML sitemap
Version:
7.x-2.x-dev
Component:
xmlsitemap.module
Priority:
Normal
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
24 Mar 2011 at 23:16 UTC
Updated:
18 Mar 2016 at 01:52 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
niryariv commentedSeeing similar behavior on my server.
The sitemap is created, works ok for a while, then at some point requests start to return 404.
The sitemap cache file still exists and seems fine. When I execute "Update cached files" the sitemap comes back on, and after a while the 404s return - with the cache file still in place.
Comment #2
egarias commentedI forgot to update this issue.
I noticed that if when new nodes are added to sitemap and there's some error in the process, then you lost the sitemap and have to rebuild.
My error was in the watchdog and in my case were mostly because short of space on /tmp
I solved that but i am following the indications in this thread: http://drupal.org/node/1134480
Hope it helps
Comment #3
weboperator commentedHave the same problem in our installation. The module seems to works fine, sitemap is created/updated according to the stored configuration. I've checked this also directly in file system. File is correct and there is no error message displayed in admin area.
But it is not possible to access sitemap.xml (http://[serverip]/drupal/sitemap.xml). Status 404 Not Found.
The standard XSL stylesheet is reachable (http://[serverip]/drupal/sitemap.xsl). Status 200 OK.
I can confirm that the problem occurs only after a while (@see niryariv). But I still have no idea how to solve.
Comment #4
Anonymous (not verified) commentedResetting version meta-data. No need to have a tag for sitemap.xml.
Comment #5
JGO commentedSame here 404 :| :|
using 7 dev
Disabling internationlization resolves the 404 ...
Comment #6
Anonymous (not verified) commentedI suspect this issue is related to #920062: XMLWriter::openUri(): Unable to resolve file path as returned from xmlsitemap_sitemap_get_file. which has a patch that needs reviewed.
Comment #7
Roy.Segall commentedi had the same problome; when the file was rebuild under the cron command, a 404 error was display. on the other hand, when i built it my self(click on the rebuild) i could access sitemap.xml with no problome.
a little research gave me the answer: cron built it with a root owner, and when i did that through the ui i got the www-data(apache) owner.
in other words: after the file is rebuild, we need to give him a www-data owner.
Best regards,
Roy.
Comment #8
Anonymous (not verified) commented@#7 Uh, if the file is owned by root then something is amiss in your execution of cron. I don't know how you even managed to get a file owned by root since the web server is the one that is supposed to be executing the cron hook implementations.
Comment #9
JGO commentedIn my case the problem does not disappear and is CLEARLY caused by the i18n support!
Comment #10
rofranco commentedI am having the same problem and have already checked file permissions, also rebuilt the links and updated the cache and nothing changes.
I keep getting 404 (not found) error when trying to access: http://mysite.com/sitemap.xml
My site is also multilingual and I am using i18n... is that the problem?
Thanks for your support.
Comment #11
Cybergrass commentedFresh install of xmlsitemap on 7.8
PHP Version 5.2.17
Install went fine.
Cron says sitemap created successfully
No warnings or errors.
mysite.com/sitemap.xml results in a 404 - page not found.
With no errors, it is difficult to determine what went wrong.
Comment #12
Anonymous (not verified) commentedThis seems to happen when the cache files are being regenerated. Therefore at times you will see sitemap.xml not found. IIRC someone posted a patch in some issue for this case. Also see #1134480: Regenerating after error for another cause of issues and a remedy for it.
Comment #13
idflood commentedNo errors or warning displayed here and only 80 nodes, but also using the i18n module. I will see if the patches in the issues linked here will help but I have some doubts.
Comment #14
idflood commentedFound that in fact it was only the default sitemap that was problematic. In my test setup there are 3 languages, each with a path prefix, /de, /fr and /en. The default sitemap had an empty context in the database, and the xmlsitemap_sitemap_load_by_context function returned nothing.
So I removed the default sitemap and recreated it. It turns out that it was enough to fix the issue.
Attached two screenshots of the xmlsitemap_sitemap database:
Comment #15
Anonymous (not verified) commentedIt sounds as if xmlsitemap needs to recognize that it needs to rebuild the "default sitemap" in this case. Dave?
Comment #16
Nico_Drup commentedthe trix works for me.
Comment #17
jisuo commentedI have the same problem I think.
I have i18n activated and 2 languages active. Default is Swedish, the other is English. If I go to the files/xmlsitemap folder I can see the 1.xml sitemap file and it looks fine if I open it, but I still get The requested page "/sitemap.xml" could not be found.
Comment #19
Anonymous (not verified) commentedUse the tricks in #14 to work around it.
Comment #20
jisuo commentedAh yes, somehow I missed that. I deleted the row in xmlsitemap_sitemap and generated a new one in /admin/config/search/xmlsitemap then updated it. Now it works.
Comment #21
Letharion commentedI experienced the same thing. #14 solved it for me.
Comment #22
mgiffordtagging
Comment #23
allexim commentedi've solved it...
when you have not one language, just use this add new XML for every of your lang-s and after that, of course, run cron
Comment #24
Anonymous (not verified) commentedDave, please take a look at #14 and answer #15.
Comment #25
jasom commented#14 fixed problem
Duplicate issue #1948480: Language subdomains gives '"Page not found"
Comment #26
Rosamunda commentedHi there,
I´ve have the same problem, but after trying #14, the problem remains.
I´ve got a spanish site. Not two languages, just a site in spanish.
At /admin/config/search/xmlsitemap I´ve got one sitemap file.
When I click "edit" it just says "There are currently no XML sitemap contexts available". I click "Save".
I´ve the updated cached files for that sitemap (Message: Updated 1 XML sitemap.)
After clicking the sitemap link: Not Found The requested URL was not found on this server.
What´s wrong?
Thanks for your help and insight!
Comment #27
Jooblay.net commented#14 fixed page not found @ http://example.com/sitemap.xml
We have 7 languages enabled. The default sitemap seems to need to be declared and set. Language neutral seems be in conflict. Another note that maybe an additional issue is we have our entire site set to private:// files by default which in turn makes the sitemapxml directory to be placed in our private:// directory path.
Additional info on stack:
Drupal 7.23
php 5.2.17
Comment #28
hosais commented#14 fixed page not found but it is not necessary to edit database directly. Based on #23 you can get the same result.
By the way, I deleted the default sitemap.
Comment #29
dave reidThis sounds like a duplicate of #768182: Handle context changes then, which I have no good idea how to resolve automatically for users.
Comment #30
dave reidComment #31
maxplus commentedHi,
I had also this issue.
My site was started without multi language en in the beginning I created a sitemap.
Afterwards the site became multi lingual and my first sitemap was not found anymore.
=> after I deleted the original sitemap, and added it again with the new language prefix, everything was OK again (just like #14)
Comment #32
anybodyEven more simple... click "Edit" in the list of sitemap URLs to make the modal with the language selection appear and simply re-save it.
This fixed things for me!
Comment #33
ngocketit commentedNone of the solutions here worked for my site which is using Domain Access module to host the main site and multiple other country sites on the same docroot and database. Some of the country site sitemaps work well but some other don't. I tried to delete/regenerate and update cached files for those from the default domain (.com) but nothing worked. Then I logged in to individual country sites, updated cached files and it worked like a charm!
Comment #34
MarioTorresp commentedYou only need to add a sitemap path for each language.
Sample:
http://www.site.com/sitemap.xml
http://www.site.com/es/sitemap.xml