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.
With #840626: Support using same mapping target multiple times we've introduced resetting target fields before mapping to them. Unfortunately we reset all possible targets. When we should only reset the ones that we are mapping to.
Comment | File | Size | Author |
---|---|---|---|
#7 | 853194-7_reset_only_used_targets.patch | 5.03 KB | alex_b |
#1 | 853194-1_reset_only_used_targets.patch | 1.96 KB | alex_b |
Comments
Comment #1
alex_b CreditAttribution: alex_b commentedPatch adjusts reset so that only targets that are actually used in mappings are reset.
This patch also adds uid as target, which would break existing tests as map() resets all mapping targets an the test checks whether a change in author survives an update.
Comment #2
andrewlevine CreditAttribution: andrewlevine commentedTaking a quick look this should be correct. I am going to test this patch on my application when I am done writing some unit tests for it.
Comment #3
andrewlevine CreditAttribution: andrewlevine commentedTook a closer look and it looks good. Applied the patch and ran it through the custom unit tests for the site I'm working on (tests if some content using mappings was imported correctly) and that worked as well. RTBC
On a side note, if I updated Feeds to HEAD some 200+ unit tests fail...not sure why
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedThanks, I was worried about losing the "timestamp", this patch fixed it.
Comment #5
alex_b CreditAttribution: alex_b commentedThank you so much for the review. I will commit this on the weekend. FYI, I think we found another regression from #840626: #855222: Beta2 node processor overrides 'published' flag default
Comment #6
andrewlevine CreditAttribution: andrewlevine commentedAlex, it is likely the #855222: Beta2 node processor overrides 'published' flag default regression will be solved by this patch, no? As long as the mapping is not set up in the feed.
Comment #7
alex_b CreditAttribution: alex_b commented- Adds a test case for the bug reported in #855222.
- Running tests now, if all are passing, I will commit.
My bad, I committed a presumably minor fix to the settings UI (remove default setting 'page' for content type in basic settings) which broke a score of tests. This is fixed now.
Comment #8
alex_b CreditAttribution: alex_b commentedCommitted, thank you.
http://drupal.org/cvs?commit=394464