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.
Tried submitting the same path twice and the validation did not catch the error. The UI shows both values and they are in the DB. This allows getting duplicates for a given path, which is totally undesirable.
Comment | File | Size | Author |
---|
Comments
Comment #1
jedihe CreditAttribution: jedihe commentedComment #3
Anonymous (not verified) CreditAttribution: Anonymous commentedTestbot needs -dev version?
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commented#1: xmlsitemap-custom-disallow-duplicates-1999958--01.patch queued for re-testing.
Comment #6
Anonymous (not verified) CreditAttribution: Anonymous commentedLooking at the failures I think you'll need to update the tests with this patch as well.
Comment #7
jedihe CreditAttribution: jedihe commentedReworked patch.
Comment #8
jedihe CreditAttribution: jedihe commentedThe patch also includes a new test case to ensure no duplicates can be added.
Comment #9
jedihe CreditAttribution: jedihe commentedPrevious patch didn't cover the case for another link having the same id (using a different type than custom). Update attached.
Comment #10
giupenni CreditAttribution: giupenni commentedI have the same problems with 7.x-2.0.
Please fix it because is very huge for google!
Comment #11
jedihe CreditAttribution: jedihe commented@giupenni: can you please test the patch and report back if it solves this issue for you? (remember to not test directly in your live site).
Comment #12
spidersilk CreditAttribution: spidersilk commentedThis problem is not restricted to XML sitemap custom - XML sitemap node and XML sitemap menu are quite capable of duplicating each other's links as well!
Maybe this patch could be adapted to prevent duplicate links from being added to the index no matter which submodule is adding them? It's not much use just having XML sitemap custom checking if a link is a duplicate before adding it, if the menu and node submodules are still duplicating each other's entries! And if it can be, then this support issue could be merged with #2257191: Remove duplicate links when using both menu and node sitemap, which is about duplicates caused by those two.
Comment #13
Chris Matthews CreditAttribution: Chris Matthews commentedThe 6 year old patch in #9 to xmlsitemap_custom.admin.inc and xmlsitemap_custom.test does not apply to the latest xmlsitemap 7.x-2.x-dev and if still applicable needs a reroll.