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.
Right now, you have two options with a StaticMap:
- Enforce that all values must be mapped
- Abort if one doesn't map.
We should add a third option (skip_row), so that rows that don't match can be skipped without affecting the whole migration.
Comment | File | Size | Author |
---|---|---|---|
#8 | 2222169-8.patch | 1.72 KB | David Hernández |
Comments
Comment #1
benjy CreditAttribution: benjy commentedI think we should make the default to skip row instead of the fatal error. This also saves us having an extra configuration option.
Comment #2
David Hernández CreditAttribution: David Hernández commentedI'm not really sure, but I think this is what is needed to skip rows by default.
Comment #3
rvilarIt works for me. I'm using it for a use case in my migration on #2225293: Migrate D6 and D7 language negotiation settings
Comment #4
pcambraLooks good to me
Comment #5
benjy CreditAttribution: benjy commentedWe no longer need the sprintf() since the message isn't used anywhere.
Also, moving this into the core issue queue since it's a change in the migrate module which i'm trying to avoid in the sandbox unless it is specifically holding something up.
Comment #6
David Hernández CreditAttribution: David Hernández commentedOk, fixing it. But this patch is required for #2225293
Comment #7
pcambraComment #8
David Hernández CreditAttribution: David Hernández commentedComment #9
benjy CreditAttribution: benjy commentedLooks good. This is an API change for the default behaviour for migrations using the static map so we'll need to re-run all the tests in the sandbox too.
Comment #11
Berdir8: 2222169-8.patch queued for re-testing.
Comment #12
benjy CreditAttribution: benjy commentedBack to RTBC.
Comment #13
alexpottCommitted c1cf341 and pushed to 8.x. Thanks!