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.
process:
bar:
plugin: entity_generate
entity_type: foo
value_key: bar
source: bar
If foo is config entity, will cause following issue:
PHP Fatal error: Cannot access protected property XXX in /var/www/html/modules/migrate_plus/src/Plugin/migrate/process/EntityLookup.php on line 273
Comment | File | Size | Author |
---|---|---|---|
#4 | 2933306-config_entity-4.patch | 3.98 KB | gnuget |
#4 | 2933306-test-only-4.patch | 2.71 KB | gnuget |
#2 | 2933306-config_entity-2.patch | 1.28 KB | jian he |
Comments
Comment #2
jian he CreditAttribution: jian he commentedComment #3
heddnCan we add a test for this? I think if you new up a NodeType or some such config entity, this would be a pretty easy testcase.
Comment #4
gnugetI found this yesterday while I was working on a user migration.
Basically, I wanted that the
entity_generate
find automatically the role of the user and if the role didn't exists then created it, so I needed this patch for makeentity_lookup
work with config entities (the roles).I tested the patch and works great, so I decided to write the test.
I attach the new patch and the tests-only patch.
(No interdiff this time because the test-only patch and the interdiff were equal.)
Comment #6
heddnLooking good from my angle.
Comment #8
heddn