XML sitemap custom adds only one link, deleting the previous one.
I need to add several links to the site map, while the module allows you to add only one link, replacing the previous one.

#3 xmlsitemap-d8_custom_link-2715397.patch959 bytesG42
Members fund testing for the Drupal project. Drupal Association Learn more


fomenkoandrey created an issue. See original summary.

pick_d’s picture

Exactly the same issue here.
Event Log is clear.
Drupal 8.3.2

G42’s picture

The issue stems from the way the module gets the highest ID from the database table. The SQL query uses a MAX expression on the xmlsitemap ID column, but that value is stored as a varchar(32) so the MAX function grabs 999 as the highest ID number instead of 1028 (or whatever is the highest ID).

I've created a patch that does not modify the database schema, however changing the ID column from varchar to int would allow the MAX expression in the sql query to function properly and might be faster than the array sorting my patch adds.

G42’s picture

Doh this is a duplicate issue: https://www.drupal.org/node/2836208