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.
Problem/Motivation
The LoadEntity dynamically creates migrations for per bundle migrations when migrating CCK fields. These migrations don't fire the same hooks that are fired when loading a normal migration.
This makes it impossible for a contrib or a custom field module to migrate from D6 to D8. This is serious enough to make the issue major.
Proposed resolution
Manually call the load hooks from LoadEntity.
Remaining tasks
Review
User interface changes
n/a
API changes
Hooks added inline with other entities.
Comment | File | Size | Author |
---|---|---|---|
#21 | 2422221-21.patch | 4.26 KB | chx |
#21 | interdiff.txt | 547 bytes | chx |
#12 | 2422221-12.patch | 9.88 KB | benjy |
#8 | interdiff.txt | 570 bytes | benjy |
#8 | 2422221-8.patch | 9.99 KB | benjy |
Comments
Comment #1
chx CreditAttribution: chx commentedComment #2
chx CreditAttribution: chx commentedComment #4
benjy CreditAttribution: benjy commentedThis will fix existing fails. New tests coming later.
Comment #5
benjy CreditAttribution: benjy commentedUnit tests and a fail test.
Comment #8
benjy CreditAttribution: benjy commentedFixed namespace.
Comment #11
benjy CreditAttribution: benjy commentedComment #12
benjy CreditAttribution: benjy commentedFixed a few things from chx's feedback on IRC.
Comment #13
chx CreditAttribution: chx commentedReally nice. I was afraid the test will need a lot more mocking, glad it didn't.
Comment #16
benjy CreditAttribution: benjy commentedThat is a random fail in HEAD.
Comment #17
alexpottDoesn't LoadTermNode::loadMultiple() also need to call the postLoad method?
Also something is fishy about doing
And then firing post load hooks.
Comment #18
benjy CreditAttribution: benjy commentedNice catch. As discussed, moved $this->postLoad into MigrationStorage.
Comment #19
benjy CreditAttribution: benjy commentedNot much left :)
Comment #20
benjy CreditAttribution: benjy commentedNew unit tests.
Comment #21
chx CreditAttribution: chx commentedFantastic, so much better. There's a typo in the patch which I fixed.
Comment #22
alexpottThis issue addresses a major bug and is allowed per https://www.drupal.org/core/beta-changes. Committed 80d54fc and pushed to 8.0.x. Thanks!