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.
After sorting mappers the xpath parser key is incorrect and may become duplicated. For example, let's say you have 3 xpathparser items and they are orderd which results in the following order:
- xpathparser:0
- xpathparser:2
- xpathparser:1
With the current code the last key will be used, and 'xpathparser:' part is removed from it so we keep the value of 1 and then +1 to it to create the next key (for the mapping form select list). This will result in xpathparser:2 which as we can see above is already used.
Comment | File | Size | Author |
---|---|---|---|
#1 | feeds_xpathparser-fix-xpathparser-key-2069889.patch | 1.21 KB | Michsk |
Comments
Comment #1
Michsk CreditAttribution: Michsk commentedSee it's been fixed already.
Anyway here's the patch i did, looks a bit cleaner but it's up to the maintainers.
Comment #2
twistor CreditAttribution: twistor commentedYeah, that's one way to do it. If we could use anonymous functions I would definitely do it. No use implementing a public method just for this though.