In the following XML we can see that the 'faq' page appears 3 times. I would think that should not happen.

In that one file I had 257 <loc> tags, 238 are distinct. (19 duplicates)

xml version="1.0" encoding="UTF-8"
xml-stylesheet type="text/xsl" href="/sites/all/modules/xmlsitemap/gss/gss.xsl"
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
                            http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
  <url>
    <loc>http://www.turnwatcher.com/aggregator/sources</loc>
    <priority>0.5</priority>
  </url>
  <url>
    <loc>http://www.turnwatcher.com/archive</loc>
    <priority>0.5</priority>
  </url>
  <url>
    <loc>http://www.turnwatcher.com/blog/4</loc>
    <priority>0.5</priority>
  </url>
  <url>
    <loc>http://www.turnwatcher.com/doc_tutorial</loc>
    <priority>0.5</priority>
  </url>
  <url>
    <loc>http://www.turnwatcher.com/faq</loc>
    <priority>0.5</priority>
  </url>
  <url>
    <loc>http://www.turnwatcher.com/faq</loc>
    <priority>0.5</priority>
  </url>
  <url>
    <loc>http://www.turnwatcher.com/faq</loc>
    <priority>0.5</priority>
  </url>
  <url>
    <loc>http://www.turnwatcher.com/forum</loc>
    <priority>0.5</priority>
  </url>
  <url>
    <loc>http://www.turnwatcher.com/install_turnwatcher</loc>
    <priority>0.5</priority>
  </url>

Comments

avpaderno’s picture

Title: Many duplicates! (loc tags) » Duplicates entries in the sitemap
avpaderno’s picture

Status: Active » Postponed (maintainer needs more info)

Which else XML Sitemap modules do you have enabled?

AlexisWilke’s picture

I have all modules turned on except the File module that was causing problems.

I suppose one could come from the nodes and one from the menu module? I'm not too sure why the term and user would generate such a problem. So why would the page be repeated 4 times?

Let me know whether I would need to test without such and such and report what I see.

Thank you.
Alexis

avpaderno’s picture

Assigned: Unassigned » avpaderno
Status: Postponed (maintainer needs more info) » Postponed

Take in mind that xmlsitemap.module shows the alias of the links passed by the other modules; if two links have the same alias, then you will see it twice.

It's likely that the duplicates come from xmlsitemap_menu.module; I thought that could be desired, but I now think it is better if also xmlsitemap_menu.module checks first if there is already a link before to add it to the site map.

I am rewriting the module, so it will take me a little to commit these changes to Drupal CVS repository.

Andy1981’s picture

I'm not sure that this is actually so much a bug as a duplicate entry caused by using a url alias. I use the global redirect module which removes duplicate reference to nodes, etc. (i.e. node/4 has an alias /info/something, global redirect removes node/4 from appearing externally - and you will only see info/something in the sitemap).

avpaderno’s picture

The links shown in the site map could be not aliased, if the module would not use a function to get back the alias of a URL.
Global redirect doesn't affect in any way the output of XML Sitemap.
The module that you are talking of simply creates a 300 redirection from the node URL to its alias URL.

AlexisWilke’s picture

Online247Solutions,

If you look at the XML snippet that I have shown, the path is .../faq several times and not .../faq and .../view/5.

So the problem is quite different.

Thank you.
Alexis

avpaderno’s picture

I replied to your I use the global redirect module which removes duplicate reference to nodes. The module doesn't influence the output produced by XML Sitemap, if that was what you meant; otherwise I don't know what the reference to Global Redirect means.

avpaderno’s picture

Component: xmlsitemap_node » xmlsitemap_node.module
Status: Postponed » Postponed (maintainer needs more info)
Issue tags: +Issue needs confirmation

Does the issue still appear in the latest versions of the Drupal 6 branch?

avpaderno’s picture

Status: Postponed (maintainer needs more info) » Fixed

I am setting the report as fixed because the report didn't get any feedback in more than 2 weeks.

Status: Fixed » Closed (fixed)
Issue tags: -Issue needs confirmation

Automatically closed -- issue fixed for 2 weeks with no activity.

rphair’s picture

I ran into this problem immediately; our site is also set to use a node URL as the home page. We are using the XML sitemap node module and we had the front page node appearing in the sitemap twice: as both its alias URL and the home page. This was fixed by editing the front page node and setting Excluded in its XML Sitemap section.

So I can confirm this feature has already been provided in xmlsitemap_node. When switching to xmlsitemap_menu the sitemap matches the menu structure perfectly (no duplicate for the alias URL).

rphair’s picture

please scratch the last comment, intended for issue 596008.