Drupal\Core\Extension\ModuleHandler->invoke() (line 352 of core/lib/Drupal/Core/Extension/ModuleHandler.php).

Has anyone had a similar problem? Something is duplicated somewhere, but where?

Comments

irobertas’s picture

I ran into the same problem today. The hook_entity_insert() implementation in the .module file caused the error. Checked that core moved it to an attribute-based hook (#[Hook('entity_insert')]). Drupal 11 now relies on autoloaded, attribute-discovered hooks instead of procedural .module hooks.
Hope it helps!

droneclub_pl’s picture

Thanks for the hint! That was actually super helpful. In my case the fix ended up being a bit more brute‑force — I deleted almost all of the old Drupal files and replaced them with fresh ones. After that everything started working again.

andysh’s picture

Thanks also for the hint. I was upgrading from 11.2.10 to 11.3.1.

I had already tried removing the vendor/ files to no avail, I had to remove and re-deploy web/core/ too, but that worked great.

lenlamberg’s picture

I agree with the previous posters.  To be clear, I used PHPStorm and changed the name of public_html/core to public_html/OLDcore.  Then I went to the terminal and engered composer update "drupal/core-*" --with-all-dependencies.  After that, the site loaded properly.