Closed (fixed)
Project:
XML sitemap
Version:
5.x-2.x-dev
Component:
Documentation
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
23 Nov 2007 at 12:33 UTC
Updated:
10 Jan 2009 at 19:20 UTC
Just having an issue with a multi site with this module installed.
http://conference.greymouse.com.au/sitemap.xml
http://education.greymouse.com.au/sitemap.xml
is the example
it worked fine with gsitemap, but when upgrading it now has caused issues.
Comments
Comment #1
darren ohGsitemap created a temporary directory from the base URL, so if your site could be accessed from multiple URLs, there would be multiple site maps. XML Sitemap uses the files directory. Since your site has only one files directory, it has only one site map. To control which URL is used in your site map, set $base_url in settings.php.
Comment #2
clint.davis commentedThanks Heaps,
As a suggestion, prob best to have some kind of check and warnning for noobs like me.
Clint.
Comment #3
darren ohComment #4
hass commentedReminder
Comment #5
hass commentedÄhm - i set this $base_url, deleted the files/xmlsitemap directory and reloaded xmlsitemap.xml, but cannot see any difference in the filename. As i know it is possible in multi site installations to have only one files directory. This would cause xmlsitemap not working as expected.
Comment #6
darren ohSetting the $base_url has nothing to do with the file name. Its purpose is to enable the site administrator to specify which URL should be the official one when multiple URLs can be used to access the site.
This is not a true multisite issue, since there is only one site being accessed by multiple URLs. I do not plan to add multiple-sitemaps per site to the main xmlsitemap module, but it would be easy to write a replacement module to work with the other included modules. Maybe call it xmlsitemap_multibase. I would be happy to split the utility functions into an xmlsitemap.inc file so they can be used by other modules.
Comment #7
hass commentedPlease place a comment on gsitemap site that users should not change to this xmlsitemap module or their multi site installation site get's broken.
Comment #8
darren ohComment #9
hass commentedHave someone already fixed this bug? Work with this system, please. keep it open until fixed.
Comment #10
darren ohIt's not going to be fixed.
Comment #11
alliax commentedThat is really a pity to be mind-blocked like this Darren! Tell me one good reason why you don't simply append the domain name in front of the saved file name, so that people will multi domains installs (several separate sites using the same drupal base and same files directory) can use it and have sitemaps for all their sites.
http://drupal.org/node/196388
Why don't you want to change that? I'm not the only one to request it. I don't mind doing it myself, but everytime the module is updated I have to change the code before putting it in my site.
Cheers,
Comment #12
copyhold commentedSuccessfully solved problem :
xmlsitemap 5.2
At the end of of _xmlsitemap_output() it calls drupal_page_footer()
and from there module_invoke_all('exit'); is called.
So in my small module i just created a
function MYMODULE_exit() {
// with only one line
if (strpos($_GET['q'],'sitemap.xml')!==FALSE) variable_set('xmlsitemap_update',TRUE);
}
now each time sitemap.xml is requested and returned xmlsitemap_update is set to true and next time it'll requested it will be regenerated for corresponding domain.
PS: i used it for localized sitemaps
Comment #13
hass commentedComment #14
avpadernoI am changing the referring version to the one which gets updates.
For what I can see, it should work with multisite Drupal installations.