Closed (fixed)
Project:
XML sitemap
Version:
7.x-2.x-dev
Component:
xmlsitemap.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
16 Mar 2013 at 06:16 UTC
Updated:
19 Jul 2024 at 09:02 UTC
Jump to comment: Most recent
Comments
Comment #1
Anonymous (not verified) commentedComment #2
Illich commentedResponses to Earnie's questions below, but first:
I just checked into the sitemap.xml and the problem is gone! The URLs are correct.
I didn't actually do anything between posting the initial help request and checking on it, except sleep.
So the immediate problem is solved, but the cause remains unknown.
Cron is set to run every three hours on the site, according to the cron configuration. I did manually run cron while trying to troubleshoot the http://default/ error prior to posting my initial help request.
No base_url is set. The statement is still commented:
http://experienceolympic.com
The sitemap that now works is at http://experienceolympic.com/sitemap.xml
Thank you.
Comment #3
Anonymous (not verified) commentedOk, hopefully it won't come back. It is usually a result of not having a $base_url set and the way cron is executed, i.e. the URI used to execute cron. If you used drush, IIRC, this has been a cause.
Comment #5
dave the brave commentedI'm reopening since I am experiencing the same issue, and I also think drush cron should result in the correct domains since using drush cron as the cron executable is becoming more popular.
"How are you executing cron? "
I have attempted drush cron and manual cron, both generate 'default' as the domain.
"What do you have set for $base_url in settings.php? "
I have the site's base url set.
"What is the string in the default base URL?"
The same as $base_url sans the trailing slash.
I have tried different combinations of these as well with no luck.
Comment #6
traviscarden commentedIf you're running cron via Drush you need to specify the URI, either manually as a command line option or via a site alias. e.g.,
drush cron --uri=http://whatever.com/ordrush @whatever cron.In the end, this comes down to configuration error, but I wonder if more should be done to prevent it. It would probably be fitting to add something to the documentation about it. Perhaps the module should also test for the condition and refuse to (re-)generate a sitemap based on
http://default/as a base URL* and write an error/warning to the log.*It's difficult to imagine a scenario, even on an intranet, where such would be the intended outcome.
Comment #7
Anonymous (not verified) commentedI'm really scratching my head on this one... I've set $base_url, checked the URL in XML Sitemap settings, changed from a regex redirect in .htaccess to an explicit redirect, run via drush, run via Drupal, and run via curl, and I still get http://default/.
Only difference is Nginx vs Apache (works on Nginx), but I can't really do anything past the local .htaccess on HostGator. (Client wouldn't let me host his site.)
Comment #8
nickknack commentedAffiming Illich's original issue. I experienced a 24-hour lag between populating the sitemap and conversion from "http://default" to "http://site.com." Same Base URL and cron settings.
Comment #9
jonhattanThis is because using misconfigured drush. See http://docs.drush.org/en/master/cron
Comment #11
ecvandenberg commentedThis issue is alive and kicking again at my old Drupal 7 websites.
Refering to post #9, that link is broken.
But when I check https://drushcommands.com/drush-8x/core/core-cron/ I do not see any issue.
How to resolve this issue other than activating the automated cron?
Comment #12
ecvandenberg commentedAh...found it.
Add a base URL in your settings.php and drush cron will generate a correct xml sitemap.
Comment #13
ressaGot here looking for a Drupal 11 solution, where it will hopefully soon be fixed. Adding link, in case anyone else finds this issue.