Quantcast
Channel: Issues for XML sitemap
Viewing all articles
Browse latest Browse all 1238

sitemap.xml file is not displayed when i18n module is enabled.

$
0
0

The i18n module adds 'en' to $context which is used to generate 'smid'. Therefore, if you have sitemaps that were created before enabling i18n they won't be displayed. Typically:

#1 install xmlsitemap

This generates a sitemap as per xmlsitemap.install.

Blank $context language

$sitemap->smid = xmlsitemap_sitemap_get_context_hash($sitemap->context);

/sitemap.xml loads fine.

#2 install xmlsitemap_i18n

Now in xmlsitemap_sitemap_load_by_contxt we have $context[language] = "en"

This is used to generate the hash that we are looking for. Therefore, it doesn't match.

xmlsitemap.install. I think this should call xmlsitemap_get_current_context(); for consistency although it doesn't fix the problem.

xmlsitemap.module - I also think xmlsitemap_sitemap_load_by_context should do something to report that the smid we were looking for was not found. The xmlsitemap files look OK but still no sitemap.xml is frustrating.

The root fix is to ensure that xmlsitemap_get_current_context() is less fragile? Or cause it to cascade backwards. I have a patch with it cascading backwards.

Usually I don't load modules unless I absolutely have to. Therefore, haven't seen this scenario even after a lot of use. Could be related to http://drupal.org/node/1593508.

AttachmentSizeStatusTest resultOperations
xmlsitemap-i18nlost-yy-1.patch1.25 KBIdlePASSED: [[SimpleTest]]: [MySQL] 525 pass(es).View details | Re-test

Viewing all articles
Browse latest Browse all 1238

Trending Articles