I have just done an upgrade to v5.50 and get an immediate:

RuntimeException: CiviCRM has not bootstrapped sufficiently to fire event "hook_civicrm_entityTypes". in Civi\Core\CiviEventDispatcher->dispatch() (line 190 of /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php).

I have a script that does the refresh of a new version and I'm not aware of anything I have changed on my UAT server where I test these things. Has anyone else seen this?

Running on D7 v7.88

  • I have this problem too. Any news?
    – Ferdi2005
    Jun 4 at 9:06
  • I cannot seem to find anything on it - I noticed that the release has had a minor tweak to 5.50.1 due to an API regression but it does not like it relates to this issue. Just tried an install and get the same issue
    – ChumKui
    Jun 4 at 12:47
  • Does the backtrace have more information? Can you double-check if the Extension upgrades have run? (go to the civicrm/admin/extensions page, it will show a notification, or run "cv api extension.upgrade" on the command line)
    – bgm
    Jun 5 at 12:45
  • @bgm The error sends the site in critical error, thus it doesn't respond to any command, nor cv works. I have Wordpress 6.0.0 and am experiencing the same issue.
    – Ferdi2005
    Jun 5 at 17:12
  • 1
    Commenting out the line adding commonBuildModuleList in Container.php does appear to solve the issue for me, so that might be a temporary workaround.
    – reswild
    Jun 6 at 18:49

5 Answers 5


Firstly check that there are no missing extensions on the system. You may need to apply the patch below or comment out commonMoudleBuildList in Container.php to see the list of missing extensions.

A patch is available https://github.com/civicrm/civicrm-core/commit/91e1627497d53cba04c6919575efb7061daf125a.patch that makes the load order predictable. This patch will enable the list of missing extensions to be displayed.

https://github.com/civicrm/civicrm-core/pull/23716 https://github.com/civicrm/civicrm-core/pull/23268 https://lab.civicrm.org/dev/core/-/issues/3496


I have just run my upgrade script against v5.50.3 and all went well, so I think we are OK on this now.


I have this issue since a long time on D8 and D9, I ended up not using CiviCRM entity after a very painful removal.

Now I see this issue on another site that had been upgraded to 5.50.1 This time I do not want to remove CiviCRM entity. But, sorry, I have no clue how to put CiviCRM entity back on track.


Commenting out commonModuleBuildList in Container.php solves the problem in the short term.

From the git log I see that Container.php had commonModuleBuildList added on 21/4/2022.

Creating a patch in composer that comments out the line maintains git workflow.

The next question is how to get initialize() to be called later. I had the idea to use hook_event_dispatcher, although it does not work. The fix seems to solve civicrm_entity but then block/user and the core drupal CiviCRM module also has hooks that are not supported by the event dispatcher.

  • Thanks - I think this is not a general solution for admins that just keep their systems patched and updated. Let's see if there is a more general fix.
    – ChumKui
    Jun 7 at 8:08

There is another patch available related with this kind of error https://github.com/civicrm/civicrm-core/pull/23739

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.