Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
When I add a new custom link, it replaces one old link. The link ID is stuck at 1000. In the xmlsitemap table, it turns out when the real max value of id
is 1234, MAX(id)
returns 999 because the id field is of type varchar.
Patch to come.
Comment | File | Size | Author |
---|---|---|---|
#7 | interdiff.txt | 1.14 KB | amateescu |
#7 | 2735127-7.patch | 1.21 KB | amateescu |
#2 | xmlsitemap-2735127-1.patch | 783 bytes | jcisio |
Comments
Comment #2
jcisio CreditAttribution: jcisio at Axess Open Web Services for ARTE G.E.I.E. commentedThis patch adds a condition on "type" to make sure that id is always numeric, and cast the id column into numeric.
Comment #3
jcisio CreditAttribution: jcisio at Axess Open Web Services for ARTE G.E.I.E. commentedComment #4
leecjus CreditAttribution: leecjus commentedI am having the same problem detailed above and would like to apply the patch. I would appreciate any guidance as to how to deploy the patched code as I am not a skilled coder. Thank you in advance.
Comment #5
ChristianAdamski CreditAttribution: ChristianAdamski as a volunteer commented@leecjus:
Open the file
xmlsitemap_custom/src/Form/XmlSitemapCustomAddForm.php
and replace the lines (roughly at line 90)with these ones
then test if this works out locally and when it does, push the file to your stage/live system.
Comment #6
leecjus CreditAttribution: leecjus commentedWorks great! Thank you very much for the straight forward instructions.
Comment #7
amateescu CreditAttribution: amateescu commentedThe patch looks mostly ok, but we need to take into account the differences in data types for various database engines.
Comment #9
amateescu CreditAttribution: amateescu commentedCommitted to 8.x-1.x. Thanks!
Comment #15
amateescu CreditAttribution: amateescu commentedComment #17
Dave ReidLooks like we also need to fix this in D7.