Administrator > Communications > Schedule Reminders error when CiviEvent disabled
Overview
When trying to access Administrator > Communications > Schedule Reminders on CiviCRM 5.57.0 with CiviEvent disabled, we see an error.
""
Reproduction steps
- Disable CiviEvent component.
- Select Administrator > Communications > Schedule Reminders.
- Got an error "Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred. Event API is not available because CiviEvent component is disabled".
Expected behaviour
Prior to 5.57.0 the user was able to access this admin page without having CiviEvent enabled.
Environment information
- CiviCRM: 5.7....
- PHP: 7.4_
- CMS: WordPress 5.8.1
- Database: MySQL 5.7.7
- Web Server: Nginx...
- Show closed items
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- marcusjwilson changed the description
changed the description
- eileen added regression label
added regression label
This is the backtrace - I was hoping it would look a little easier
| Civi\API\Exception\NotImplementedException: Event API is not available because CiviEvent component is disabled in /srv/civi-sites/dmaster/web/sites/all/modules/civicrm/Civi/Api4/Generic/AbstractAction.php on line 454 | | | |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------| | Exception trace | | | | # | Function | Location | | 0 | Civi\API\Request::create('Event', 'getFields', Array) | /srv/civi-sites/dmaster/web/sites/all/modules/civicrm/Civi/Api4/Generic/AbstractAction.php:454 | | 1 | Civi\Api4\Generic\AbstractAction->entityFields() | /srv/civi-sites/dmaster/web/sites/all/modules/civicrm/Civi/Api4/Event/Subscriber/IsCurrentSubscriber.php:31 | | 2 | Civi\Api4\Event\Subscriber\IsCurrentSubscriber->onApiPrepare(Object(Civi\API\Event\PrepareEvent), 'civi.api.prepare', Object(Civi\Core\UnoptimizedEventDispatcher)) | unknown:unknown | | 3 | call_user_func_array(Array, Array) | /srv/civi-sites/dmaster/web/sites/all/modules/civicrm/Civi/Core/Event/ServiceListener.php:53 | | 4 | Civi\Core\Event\ServiceListener->__invoke(Object(Civi\API\Event\PrepareEvent), 'civi.api.prepare', Object(Civi\Core\UnoptimizedEventDispatcher)) | /srv/civi-sites/dmaster/web/sites/all/modules/civicrm/vendor/symfony/event-dispatcher/EventDispatcher.php:251 | | 5 | Symfony\Component\EventDispatcher\EventDispatcher->callListeners(Array, 'civi.api.prepare', Object(Civi\API\Event\PrepareEvent)) | /srv/civi-sites/dmaster/web/sites/all/modules/civicrm/vendor/symfony/event-dispatcher/EventDispatcher.php:73 | | 6 | Symfony\Component\EventDispatcher\EventDispatcher->dispatch(Object(Civi\API\Event\PrepareEvent), 'civi.api.prepare') | /srv/civi-sites/dmaster/web/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php:260 | | 7 | Civi\Core\CiviEventDispatcher->dispatch('civi.api.prepare', Object(Civi\API\Event\PrepareEvent)) | /srv/civi-sites/dmaster/web/sites/all/modules/civicrm/Civi/API/Kernel.php:249 | | 8 | Civi\API\Kernel->prepare(Object(Civi\Api4\Provider\ActionObjectProvider), Object(Civi\Api4\Action\Event\Get)) | /srv/civi-sites/dmaster/web/sites/all/modules/civicrm/Civi/API/Kernel.php:157 | | 9 | Civi\API\Kernel->runRequest(Object(Civi\Api4\Action\Event\Get)) | /srv/civi-sites/dmaster/web/sites/all/modules/civicrm/Civi/Api4/Generic/AbstractAction.php:250 | | 10 | Civi\Api4\Generic\AbstractAction->execute() | /srv/civi-sites/dmaster/web/sites/all/modules/civicrm/Civi/ActionSchedule/Mapping.php:284 | | 11 | Civi\ActionSchedule\Mapping::getValueLabelMap('activity_type') | /srv/civi-sites/dmaster/web/sites/all/modules/civicrm/Civi/ActionSchedule/Mapping.php:197 | | 12 | Civi\ActionSchedule\Mapping->getValueLabels() | /srv/civi-sites/dmaster/web/sites/all/modules/civicrm/CRM/Core/BAO/ActionSchedule.php:75 | | 13 | CRM_Core_BAO_ActionSchedule::getAllEntityValueLabels() | /srv/civi-sites/dmaster/web/sites/all/modules/civicrm/CRM/Admin/Form/ScheduleReminders.php:132 | | 14 | CRM_Admin_Form_ScheduleReminders->buildQuickForm() | /srv/civi-sites/dmaster/web/sites/all/modules/civicrm/CRM/Core/Form.php:694 | | 15 | CRM_Core_Form->buildForm() | /srv/civi-sites/dmaster/web/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Display.php:76 | | 16 | CRM_Core_QuickForm_Action_Display->perform(Object(CRM_Admin_Form_ScheduleReminders), 'display') | /srv/civi-sites/dmaster/web/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php:203 | | 17 | HTML_QuickForm_Controller->handle(Object(CRM_Admin_Form_ScheduleReminders), 'display') | /srv/civi-sites/dmaster/web/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php:103 | | 18 | HTML_QuickForm_Page->handle('display') | /srv/civi-sites/dmaster/web/sites/all/modules/civicrm/CRM/Core/Controller.php:355 | | 19 | CRM_Core_Controller->run() | /srv/civi-sites/dmaster/web/sites/all/modules/civicrm/CRM/Core/Page/Basic.php:334 | | 20 | CRM_Core_Page_Basic->edit(1, null) | /srv/civi-sites/dmaster/web/sites/all/modules/civicrm/CRM/Core/Page/Basic.php:140 | | 21 | CRM_Core_Page_Basic->run(Array, null) | /srv/civi-sites/dmaster/web/sites/all/modules/civicrm/CRM/Core/Invoke.php:319 | | 22 | CRM_Core_Invoke::runItem(Array) | /srv/civi-sites/dmaster/web/sites/all/modules/civicrm/CRM/Core/Invoke.php:69 | | 23 | CRM_Core_Invoke::_invoke(Array) | /srv/civi-sites/dmaster/web/sites/all/modules/civicrm/CRM/Core/Invoke.php:36 | | 24 | CRM_Core_Invoke::invoke(Array) | /srv/civi-sites/dmaster/web/sites/all/modules/civicrm/drupal/civicrm.module:471 | | 25 | civicrm_invoke('admin', 'scheduleReminder…') | /srv/civi-sites/dmaster/web/includes/menu.inc:527 | | 26 | menu_execute_active_handler() | /srv/civi-sites/dmaster/web/index.php:21 |
Edited by eileen- A deleted user added has-pull-request label
added has-pull-request label
- Author
Thanks for jumping on this so quickly, @eileen
I merged Eileen's PR since it helps this particular edge. But, her comments and mine suggest that there's still some more/similar rough edges (re: scheduled reminders vs disabled components). We should probably have something to track that, although I don't have an opinion on whether it should be the same issue #4145 (closed) or a new/distinct issue.
- eileen closed
closed