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.
The Problem
After the commit c5fd6239c045c1a00ba53d8af61cbd4db512bc30 I get the following error:
PHP Fatal error: Call to a member function get() on boolean in /var/www/xxx/modules/contrib/migrate_tools/src/Controller/MigrationListBuilder.php on line 129
Reverting back to 8.x-4.0-beta1 fixes the problem.
temporary workaround
Until this is resolved try using beta3 of both migrate_plus and migrate_tools.
Comment | File | Size | Author |
---|---|---|---|
#20 | disabled-migrations-list-2894708-20.patch | 3.77 KB | sandboxpl |
#20 | disabled-migrations-list-2894708-20-tests.patch | 3.1 KB | sandboxpl |
#17 | disabled-migrations-list-2894708-17.patch | 699 bytes | awolfey |
#16 | disabled-migrations-list-2894708-12992403.patch | 699 bytes | awolfey |
Comments
Comment #2
hugronaphor CreditAttribution: hugronaphor as a volunteer and at Acrosto for Acrosto commentedComment #3
heddnSteps to reproduce and patches welcome.
Comment #4
heddnThis isn't related to #2769237: PHP Fatal error: Call to a member function label() on boolean , by any chance?
Comment #5
gaurav.goyal CreditAttribution: gaurav.goyal commentedHey @heddn,
We are also facing the same problem and occurrence of this issue is at random intervals. Once we clear cache, it goes away but after running migration twice, it comes back.
We generally see this error while executing - `drush ms` and we are using latest version(8.x-4.0-beta1) of migrate_tools module.
Comment #6
gaurav.goyal CreditAttribution: gaurav.goyal commentedUpdating both migrate_plus & migrate_tools modules to 8.x-4.0-beta1 fixes the above issue.
Comment #7
hugronaphor CreditAttribution: hugronaphor as a volunteer and at Acrosto for Acrosto commentedI'm not getting this error anymore so, I'm closing it.
Comment #8
vasikei got this on UI
http://d8/admin/structure/migrate/manage/migrate_drupal_7/migrations
with the latest 8.4.dev
here is the "wsod" full message
Comment #9
babis.p CreditAttribution: babis.p commentedI'm changing this to critical because this error happens even with the Beer migrations in migrate_example, and it make migrate_tools unusable - I cannot run a single migration.
At the same time,
drush migrate-status
displays an empty table, with no migrations in it. I guess it is due to this exact bug.Comment #10
ifrikI had the same problem because composer had installed the wrong version of Migrate Plus - an 8.2 version.
Using 4.0-beta3 for both Migrate Plus and Migrate Tools works for me.
Comment #11
Gold+1 for this. This has been driving me nuts for days now.
Comment #12
matthieuscarset CreditAttribution: matthieuscarset as a volunteer and at Appnovation commentedUsing 4.0-beta3 for the two modules migrate_plus and migrate_tools still raise an exception for me:
Comment #13
LOBsTerr CreditAttribution: LOBsTerr commentedI had a similar issue. As result, migrate_plus version was out of date. The upgrade to the latest version (4.0.0-beta3) solved the issue
migrate_tools - 4.0.0-rc1
Comment #14
heddnI need more help on reproducing this. Is it that an update solves things and time has passed enough that this is no longer an issue?
Comment #15
awolfey CreditAttribution: awolfey commentedI get this after setting a migration status to false and importing config.
status: false
Setting it back to false and importing causes the error to go away.
$migration = $this->migrationPluginManager->createInstance($migration_entity->id());
sets $migration to false. We need to return NULL there. I'll make a patch.
Comment #16
awolfey CreditAttribution: awolfey commentedComment #17
awolfey CreditAttribution: awolfey commentedFix comment number.
Comment #18
heddnWe don't need to return NULL explicitly. That is the default if we just
return;
.However, I'd also like to see some tests of this. This should be possible by just tweaking and copy/pasting some of the existing ones. See
MigrateExecutionFormTest
as an example.Comment #19
sandboxplI've updated the patch with simplified return statement, gonna try to figure out some tests soon
Comment #20
sandboxplAllright, attached two patches:
First is test only containing new test with following bits and pieces:
Second patch contains new tests + fix for the error.
Expected result of test-only patch:
Expected result of test+fix patch:
Comment #21
sandboxplso test went as expected, but oh my, now I have to figure out how to copy it into drupalspoons gitlab thingy :o
Comment #22
sandboxplComment #23
Grevil CreditAttribution: Grevil as a volunteer and at DROWL.de commentedJust ran into a similar Problem "Call to a member function id() on bool in Drupal\migrate_tools\Controller\MigrationListBuilder->buildRow()", the patch from @sandboxpl fixed it though!
Also the code example for the hook_migration_plugins_alter is not working with migrate_tools enabled: https://api.drupal.org/api/drupal/core%21modules%21migrate%21migrate.api...
Thx everyone!
Comment #24
Grevil CreditAttribution: Grevil as a volunteer and at DROWL.de commentedPatch #20 works perfectly!
Comment #25
AnybodyConfirming RTBC! :) Removing needs-tests as they are present now as of #20.
Comment #27
heddnThanks for the contributions.