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.
I wanted to reorder my mappings to get the columns in the template CSV file in the right order. But to do this I had to remove all mappings and add them again. That's not fun... so I wrote a patch that's add a weight column and tabledrag for some easy reordering.
Comment | File | Size | Author |
---|---|---|---|
#2 | 1410296-reorder-mappings.patch | 4.82 KB | vinmassaro |
#1 | feed_ui_reorder_mappings-1410296-1.patch | 3.46 KB | logaritmisk |
Comments
Comment #1
logaritmisk CreditAttribution: logaritmisk commentedComment #2
vinmassaro CreditAttribution: vinmassaro commentedThis is a very helpful feature for an importer I am building with over 30+ mappings that will eventually need to be reordered. Your patch worked for me except when there were no mappings defined and I clicked 'Save' on the feed importer. It returned an error because $mappings was empty, so I added a condition to check if it's empty. I've rolled a new patch against 7.x-2.x that is git aware and combines these changes. Thanks!
Comment #3
anonAwesome, the patch in #2 works perfect, don't know what more to say. Grate job both of you!
Comment #4
twistor CreditAttribution: twistor commentedVery nice!
An error is thrown when you remove a mapping because the arrays are different sizes. Also, this should have a test that goes through the basic functionality to avoid regressions.
I like it.
Comment #5
twistor CreditAttribution: twistor commentedCommitted in http://drupalcode.org/project/feeds.git/commit/dde0b25.
Patch did not apply, so I re-rolled and fixed the issue I mentioned. Tests coming up next.
This could be backported.
Comment #6
twistor CreditAttribution: twistor commentedComment #7
twistor CreditAttribution: twistor commentedNot backporting things at things point. If someone wants to provide a patch, go for it.