Problem/Motivation

After downloading 2.x-dev, migrate_tools causes a fatal error on the front page due to entity type not defined. This could have been due to migrate_upgrade failing as well, but it is best practice to check whether or not the entity type exists in the alter.

Error: Call to a member function set() on null in /var/www/local.www.kosada.com/webroot/modules/migrate_tools/migrate_tools.module on line 15

Proposed resolution

Make sure that entity type object exists before attempting method calls on a potentially non-existent object.

Remaining tasks

Write a patch

Comments

mradcliffe created an issue. See original summary.

coconnor’s picture

Submitting a basic patch per the issue described above.

Before making this code change, I was unable to upgrade Drupal 8.0 -> 8.1.1. Adding this check allows me to complete the upgrade, but I'm unsure if this remedies any underlying issues.

davidwbarratt’s picture

Status: Active » Needs review
StatusFileSize
new1.96 KB

Since Migrations are no longer entities, then in Drupal 8.1.0+; this hook doesn't do anything at all and can be removed.

themic8’s picture

@davidwbarratt's patch working for me, comment 3. Still testing but looking good.

I am upgrading from 8.0.x to 8.1.7.

mikeryan’s picture

Status: Needs review » Postponed (maintainer needs more info)

Has anyone actually seen this error lately? Since migrate_tools depends on migrate_plus, which defines the migration entity type, it's hard to see why this would happen...

Since Migrations are no longer entities, then in Drupal 8.1.0+; this hook doesn't do anything at all and can be removed.

In D8.1.x+, migrate_plus provides the entities. The UI is based on those entities and the hook is necessary - the UI won't work without it.

mikeryan’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)