Closed (works as designed)
Project:
XML sitemap
Version:
6.x-2.0-unstable4
Component:
xmlsitemap_node.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
12 Sep 2009 at 19:27 UTC
Updated:
19 May 2021 at 09:21 UTC
Jump to comment: Most recent
Comments
Comment #1
Anonymous (not verified) commentedWell, the behavior certainly isn't a bug. I can see if Global Redirect is installed that you shouldn't see the specified node URL. I think this comes down to perhaps how `loc` column value is created or perhaps the weight of modules. What weight does the Global Redirect module have in your system as compared to xmlsitemap?
Comment #2
jantoine commentedHi Earnie,
I am having a similar issue with v6.x-1.1. In my system table, the xmlsitemap module has a weight of 5 while the globalredirect module has a weight of 1500. I also have the path_redirect module installed and it has a weight of 0. Thanks for looking into this.
Cheers,
Antoine
Comment #3
Anonymous (not verified) commentedWhat do you think Dave, "by design"? If Global Redirect is changing the URL after xmlsitemap has stored it there is nothing for xmlsitemap to do. You'll have to modify the module weights for your site so that they best meet desired affects for you. Remember that hooks are called in order by weight and alpha correlation. With the Global Redirect at 1500 and xmlsitemap at 5 the Global Redirect modification to the URL happens too late.
You can check out http://drupal.org/project/util for help with reassigning module weights. I have never used it so don't know if it is the best thing to use.
Comment #4
avpadernoThere was code in version 6.x-0.x that checked if the node being added was used for the front page (therefore, it was not added).
I think that such checking is computationally expensive, and it should take care of any changes of the front page settings.
In other words, in a site with 10000 nodes, 200 menu links added to the sitemap, and 200 custom links, the check would be done 10400 times. In all those 10400 links added to the sitemap, there can be not more than 3 links that point to the node used for the front page (if a node is used as front page), or 2 links in the case the front page is s custom page created by a third-party module (I am taking the assumption that somebody could have a link to the front page in the menu used by XML Sitemap, or that the URL for the front page would be added to the custom links used by XML sitemap).
Comment #5
Anonymous (not verified) commentedThis is "by design" and "won't fix". I'm allowing "by design" to have greater importance.
Comment #6
avpadernoI think that is the correct status.
Comment #7
dave reidIdeally this would be solved by the "duplicate link checker" (#454442: Disable duplicate links during regeneration) run before generation since it would see that the front page path is the same as a visible sitemap link. The other option would be a checkbox to include or exclude the front page sitemap link, but I'd much rather prefer the generalized solution in the linked issue for duplicate links.
Comment #8
odegard commentedSorry for digging this up again, but I've run into this problem, and it _is_ a problem.
One major purpose of a sitemap.xml is for SEO, and when two links point to the same content, this is an issue.
I also understand that checking the front page settings is computationally expensive, but only if you run the check _while generating_. What if the sitemap was filtered _after_ it was generated?
Comment #9
-Mania- commentedI agree it should be fixed. Even Google Webmasters Tools is giving a warning because of it:
"When we tested a sample of URLs from your Sitemap, we found that some URLs redirect to other locations. We recommend that your Sitemap contain URLs that point to the final destination (the redirect target) instead of redirecting to another URL."
The above warning was because node/1 was set as front page but both are found in sitemap.xml.
Comment #10
dave reidSo you go edit that node, and set its XML sitemap status to be excluded. Done.
Comment #11
-Mania- commentedThanks Dave, that did the trick. I was actually looking for an exclusion list in the XML Sitemap admin settings but didn't think to look in the node itself.
Comment #12
finex commentedHi, this bug is still present on latest D8/9 version