Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Even though we have about 6 different domains and languages configured, the function xmlsitemap_sitemap_uri() returns the same value for every language/domain. Even if we delete the 'xmlsitemap_base_url' variable, it still uses the one global base_url of the current site you are looking at. This causes all sitemaps in the list to look like this:
http://mysite.com
http://mysite.com (korean)
http://mysite.com (japanese)
Instead of looking like this:
http://mysite.com
http://mysite.ko (korean)
http://mysite.jp (japanese)
Comment | File | Size | Author |
---|---|---|---|
#7 | xmlsitemap-2492433-7.patch | 782 bytes | askovdal |
#6 | xmlsitemap-2492433-6.patch | 782 bytes | sam.spinoy@gmail.com |
Comments
Comment #1
zhuber CreditAttribution: zhuber as a volunteer and at Mirum Agency commentedThe following patch allows each language/domain to have a separate base URL for the sitemap URI.
Comment #2
zhuber CreditAttribution: zhuber as a volunteer and at Mirum Agency commentedComment #4
zhuber CreditAttribution: zhuber as a volunteer and at Mirum Agency commentedComment #5
Chris Matthews CreditAttribution: Chris Matthews commentedThe 4 year old patch in #4 to xmlsitemap.module does not apply to the latest xmlsitemap 7.x-2.x-dev and if still applicable needs a reroll.
Comment #6
sam.spinoy@gmail.com CreditAttribution: sam.spinoy@gmail.com at Adapt commentedReroll
Comment #7
askovdal CreditAttribution: askovdal commentedPatch for version 2.6
Comment #8
amit.drupal CreditAttribution: amit.drupal as a volunteer and at Valuebound for Valuebound commentedPatch #6 and Patch #7 both are similar.
Comment #9
rpayanmComment #11
arpas CreditAttribution: arpas commentedPatch #6 can be applied to version 7.x-2.6 but will overwrite global base_url!
Function
xmlsitemap_sitemap_uri
in module version 7.x-2.6 is usingglobal $base_url;
so patch must be updated to prevent global base_url overwrite.Comment #12
poker10 CreditAttribution: poker10 at ActivIT s.r.o. commentedAs mentioned in #11, the last patches are wrong, as they overwrite global base_url. Switching to Needs Work.