The default base URL being required seems to me to break one of the nice things about Drupal -- that you can move it to a different URL and nothing breaks.
Consider:
1. I go to sitemap settings and change some other settings and save the form
2. Because the form element is required and prepopulated with the default from the site's current location, the site's current location is now saved into the database.
3. I move the site to a new location, say a subfolder, a subdomain, a new domain entirely. Or I just move it from dev to live...
4. The sitemap is now broken, by a setting I didn't even know existed.
Suggestion: leave it blank to automatically use the value from $GLOBALS['base_url'].
Comment | File | Size | Author |
---|---|---|---|
#12 | xmlsitemap-base_url_unrequired-1295742-12-D7.patch | 3.04 KB | Liam Morland |
|
Comments
Comment #1
joachim CreditAttribution: joachim commentedHere's a patch on beta 3.
Note this also catches a bug with xmlsitemap_settings_form_submit missing a & on the $form_state parameter.
Comment #3
Anonymous (not verified) CreditAttribution: Anonymous commentedSorry, you're asking for a new feature otherwise this is "works as designed". You'll need to base your patch on D7 and then we can look at incorporating it into D6 if the feature is approved.
Earnie
Comment #4
joachim CreditAttribution: joachim commentedI disagree -- if this is 'works as designed', then the design is wrong, because as I explained in the report, it breaks an important feature of Drupal.
Comment #5
Dave ReidThere are *waaaaaay* too many problems that are easily prevented by making this field required, but this might be something to look at.
Comment #6
leewillis77 CreditAttribution: leewillis77 commentedWe've just been bitten by this again, and Joachim's patch makes sense conceptually to us. If we can get a working patch, would it be considered?
Comment #7
Anonymous (not verified) CreditAttribution: Anonymous commentedYes, all patches are considered. Acceptance would be based on what else breaks because of it.
Comment #8
leewillis77 CreditAttribution: leewillis77 commentedThis is a re-roll of Joachim's patch to cleanly apply to 7.x-2.x, and works for us.
Comment #9
mgiffordThe patch still applies. @leewillis77 are you still using it in production? Your patch from 3 years ago still applies.
Comment #10
leewillis77 CreditAttribution: leewillis77 at Upbeat Productions commentedHi;
We don't use it by default on new installs I don't believe - we adjusted our go-live process to avoid the issue (Setting the sitemap up explicitly on production).
Which isn't to say that it's wrong - I don't think it is. It's just that I don't have any hard evidence to back up that conclusion :)
Comment #11
Chris Matthews CreditAttribution: Chris Matthews commentedThe 6 year old patch in #8 to xmlsitemap.admin.inc and xmlsitemap.test does not apply to the latest xmlsitemap 7.x-2.x-dev and if still applicable needs a reroll.
Comment #12
Liam Morland