Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev/core#3502 - CiviEventDispatcher - Softer errors for not-ready. More comments. #23739

Merged
merged 2 commits into from
Jun 14, 2022

Conversation

totten
Copy link
Member

@totten totten commented Jun 9, 2022

Overview

v5.50 is more likely to raise complaints about hooks that fire during bootstrap (as in the case of https://lab.civicrm.org/dev/core/-/issues/3502). This patch tries to turn-down the volume on such errors.

(This is the 5.50-stable variant of the patch. RC patch is #23785.)

Before

  • Throws exception.

After

  • Shows a message to the web-user (trigger_error(...E_USER_WARNING))
  • Logs a message for sysadmin (error_log()) with backtrace.

Comments

Two use-cases:

  1. The easiest way to trigger an error is to hack boot() function, eg

     \CRM_Utils_Hook::singleton()->commonBuildModuleList('civicrm_boot');
    +\CRM_Utils_Hook::entityTypes($x);
     $bootServices['dispatcher.boot']->setDispatchPolicy($mainDispatchPolicy);
  2. I also managed to [reproduce the same error as @francescbassas](https://lab.civicrm.org/dev/core/-/issues/3502#note_75272. Activating rules wasn't enough -- I needed also needed a rule to specifically react to logs.

Trying out these two cases with each way of recording the error, I'm a little torn:

  • With error_log(), it was really quiet. There was no hint of the problem -- unless you dig into server logs. But I do think it's good to have it in the server log (eg to get backtrace).
  • With trigger_error(), it's... somewhat softer, but not as much as I hoped. Case #1 definitely softened. However, case #2 still produced a crash -- because trigger_error() still activates Drupal watchdog (watchdog=>rules=>entity=>civicrm_entity=>hook).

UPDATE: My last comment was probably misplaced - eg I had used trigger_error(...E_USER_ERROR), which caused a full stop (sometimes). Changing to trigger_error(...E_USER_WARNING) seems to produce more desirable+consistent behavior (ie in all configurations that I tested on D7+WP, it showed the warning to the user - but continued executing).

@civibot
Copy link

civibot bot commented Jun 9, 2022

(Standard links)

@civibot civibot bot added the 5.50 label Jun 9, 2022
@eileenmcnaughton
Copy link
Contributor

Just noting to be careful with versions here - our process is to merge to the rc & then back-port to stable. This is against stable (& the rc is not yet forked)

@totten totten changed the title (Draft) dev/core#3502 - CiviEventDispatcher - Softer errors for not-ready. More comments. dev/core#3502 - CiviEventDispatcher - Softer errors for not-ready. More comments. Jun 14, 2022
@totten
Copy link
Member Author

totten commented Jun 14, 2022

@eileenmcnaughton OK, I fixed my issue with the logging level and retested. Looks better. Squashed. Opened RC PR as #23785.

@francescbassas
Copy link
Contributor

I just tried this code and it still gives me the error commented here.

Additional uncaught exception thrown while handling exception.
Original

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

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

@totten
Copy link
Member Author

totten commented Jun 14, 2022

@francescbassas That's very strange. With this patch, at a minimum, the prose of the message should have changed, eg

BEFORE: CiviCRM has not bootstrapped sufficiently to fire event \"$eventName\"
AFTER: The event \"$eventName\" attempted to fire before CiviCRM was fully loaded. Skipping.

Maybe search the filesystem (eg grep -r) to see where not bootstrapped sufficiently is coming from? Like... could there be an extra/unpatched copy of the codebase floating somewhere?

@francescbassas
Copy link
Contributor

@totten sorry. I must have misapplied the patch.

Now when I clean drupal caches I get the following warnings but page reloads well.

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entities" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entity_labels" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_entity_supported_info" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

Warning: The event "hook_civicrm_alter_drupal_entities" attempted to fire before CiviCRM was fully loaded. Skipping. in /var/www/html/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php on line 200

@totten
Copy link
Member Author

totten commented Jun 14, 2022

(@francescbassas) Now when I clean drupal caches I get the following warnings but page reloads well.

OK, so it is an improvement. I'll go ahead and merge for 5.50/5.51 on that basis.

That list is really long. Curious about why your system produces so many more than mine. Maybe it somehow depends on the specific list of rules that are configured? Or maybe there are additional files (like campaign.civix.php) with syntax-warnings?

But in any event, this is better than status-quo.

@totten totten merged commit 9bf2d2f into civicrm:5.50 Jun 14, 2022
@totten totten deleted the 5.50-hook-log branch June 14, 2022 21:13
@francescbassas
Copy link
Contributor

@totten I think Campaign extension is throwing some warnings but I think that a Drupal module (Print PDF) is also throwing a lot of warnings. I don't use rules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants