Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Hi
I'm using migrate-upgrade to try to move my D6 website to D8.
During the migrate-upgrade process, I got that error
Importing d6_node_revision__texte
Calling Drupal\migrate\MigrateExecutable::import() [114.62 sec, 72.18 MB] [debug]
PHP Fatal error: Call to a member function enforceIsNew() on null in /var/www/html/D8/core/modules/migrate/src/Plugin/migrate/destination/EntityRevision.php on line 47
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Call to a member function enforceIsNew() on null in /var/www/html/D8/core/modules/migrate/src/Plugin/migrate/destination/EntityRevision.php, line 47 [227.15 sec, 72.4 MB]
I've another issue opened about that in the migrate-upgrade issue queue there but i'm pretty sure that the prob is relevant to the D8 core.
Any idea or help for me here ?
Thanks
Best regards.
D.
Comments
Comment #2
mikeryanAs it happens, I saw exactly the same error today when debugging a D5->D8 migration path. I finally figured out what it was - I had taken a db dump of my D8 database before starting to run test migrations with migrate_upgrade, and was going in a loop as follows:
The problem here is that the mysql import does drop/create table for each of the tables in the original pre-migration site. However, the first migrate-upgrade created (and populated) migration map and message tables. These remained for each cycle, so subsequent migration runs saw the populated tables and... got confused. In particular, with the migrate_map_d6_node__* tables already populated, the node migrations did not actually create any nodes - then, the node revision plugin tries to reference the non-existent nodes and dies horribly.
So, between attempts at migrate-upgrade, I drop all tables in the database before load the backup and it's worked fine for me.
Could this explain what you're seeing?
Comment #3
dbourrion CreditAttribution: dbourrion commentedHi :)
In fact, I'm starting each test with an new brand D8 database installation, dropping the "old" one and setting up the D8 website in order to be in a clean situation. So the problem look's being somewhere else.
Best regards
D.
Comment #5
mikeryanThis problem has not been reported since, and the linked migrate-upgrade issue shows this message downstream of some dependency issues - let's close this out, pending anyone reproducing it in 8.1.x or 8.2.x.