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

dbourrion created an issue. See original summary.

mikeryan’s picture

Status: Active » Postponed (maintainer needs more info)

As 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:

drush migrate-upgrade ...
*fricken fracken*
mysql -u root d8 <clean_d8_db.sql
*back to top*

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?

dbourrion’s picture

Status: Postponed (maintainer needs more info) » Active

Hi :)
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.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

mikeryan’s picture

Status: Active » Closed (cannot reproduce)

This 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.