Answers.Body: <p>Upgrading CiviCRM from 5.69.3 to 5.69.5 fixed this issue for us.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-03-11T04:40:04.733Z
Answers.LastActivityDate: 2024-03-11T04:40:04.733Z
Answers.UserDisplayName: Jude Hungerford
Body: <p>We have a team member who helps us set up events.  We have just upgraded to CiviCRM 5.68.1 on Drupal 7.  This error has cropped up only since our upgrade.</p>
  <p>This team member has the following permissions:</p>
  <ul>
  <li>CiviCRM: skip IDS check</li>
  <li>CiviCRM: access CiviCRM backend and API</li>
  <li>CiviEvent: access CiviEvent</li>
  <li>CiviEvent: edit event participants</li>
  <li>CiviEvent: edit all events</li>
  <li>CiviEvent: register for events</li>
  <li>CiviEvent: view event info</li>
  </ul>
  <p>Notably, they do not have &quot;Administer CiviCRM&quot; since they should only be in here helping us with event creation and management.</p>
  <p>When this user clicks to edit an event reminder, we get the following error in the log:</p>
  <pre><code>2024-01-15 15:30:56-0800  [debug] $API Request Authorization failed = #0 /var/www/html/sites/all/modules/civicrm/Civi/API/Kernel.php(151): CRM_Core_Error::backtrace(&quot;API Request Authorization failed&quot;, TRUE)
  #1 /var/www/html/sites/all/modules/civicrm/Civi/Api4/Generic/AbstractAction.php(256): Civi\API\Kernel-&gt;runRequest(Object(Civi\Api4\Generic\DAOGetAction))
  #2 /var/www/html/sites/all/modules/civicrm/api/api.php(91): Civi\Api4\Generic\AbstractAction-&gt;execute()
  #3 /var/www/html/sites/all/modules/civicrm/CRM/Admin/Form.php(161): civicrm_api4(&quot;ActionSchedule&quot;, &quot;get&quot;, (Array:1))
  #4 /var/www/html/sites/all/modules/civicrm/CRM/Admin/Form.php(77): CRM_Admin_Form-&gt;retrieveValues()
  #5 /var/www/html/sites/all/modules/civicrm/CRM/Admin/Form/ScheduleReminders.php(50): CRM_Admin_Form-&gt;preProcess()
  #6 /var/www/html/sites/all/modules/civicrm/CRM/Core/Form.php(717): CRM_Admin_Form_ScheduleReminders-&gt;preProcess()
  #7 /var/www/html/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Display.php(76): CRM_Core_Form-&gt;buildForm()
  #8 /var/www/html/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display-&gt;perform(Object(CRM_Admin_Form_ScheduleReminders), &quot;display&quot;)
  #9 /var/www/html/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller-&gt;handle(Object(CRM_Admin_Form_ScheduleReminders), &quot;display&quot;)
  #10 /var/www/html/sites/all/modules/civicrm/CRM/Core/Controller.php(355): HTML_QuickForm_Page-&gt;handle(&quot;display&quot;)
  #11 /var/www/html/sites/all/modules/civicrm/CRM/Utils/Wrapper.php(98): CRM_Core_Controller-&gt;run()
  #12 /var/www/html/sites/all/modules/civicrm/CRM/Core/Invoke.php(295): CRM_Utils_Wrapper-&gt;run(&quot;CRM_Admin_Form_ScheduleReminders&quot;, &quot;Schedule Reminders&quot;, (Array:0))
  #13 /var/www/html/sites/all/modules/civicrm/CRM/Core/Invoke.php(69): CRM_Core_Invoke::runItem((Array:17))
  #14 /var/www/html/sites/all/modules/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:4))
  #15 /var/www/html/sites/all/modules/civicrm/drupal/civicrm.module(472): CRM_Core_Invoke::invoke((Array:4))
  #16 /var/www/html/includes/menu.inc(527): civicrm_invoke(&quot;admin&quot;, &quot;scheduleReminders&quot;, &quot;edit&quot;)
  #17 /var/www/html/index.php(21): menu_execute_active_handler()
  #18 {main}
  
  
  2024-01-15 15:30:56-0800  [error]
  $Fatal Error Details = array:3 [
    &quot;message&quot; =&gt; &quot;Authorization failed&quot;
    &quot;code&quot; =&gt; null
    &quot;exception&quot; =&gt; Civi\API\Exception\UnauthorizedException {#2401
      -errorData: array:1 [
        &quot;error_code&quot; =&gt; &quot;unauthorized&quot;
      ]
      #cause: null
      -_trace: null
      #message: &quot;Authorization failed&quot;
      #code: 0
      #file: &quot;/var/www/html/sites/all/modules/civicrm/Civi/API/Kernel.php&quot;
      #line: 230
      trace: {
        /var/www/html/sites/all/modules/civicrm/Civi/API/Kernel.php:230 {
          Civi\API\Kernel-&gt;authorize($apiProvider, $apiRequest)
          › if (!$event-&gt;isAuthorized()) {
          ›   throw new \Civi\API\Exception\UnauthorizedException(&quot;Authorization failed&quot;);
          › }
        }
        /var/www/html/sites/all/modules/civicrm/Civi/API/Kernel.php:147 { …}
        /var/www/html/sites/all/modules/civicrm/Civi/Api4/Generic/AbstractAction.php:256 { …}
        /var/www/html/sites/all/modules/civicrm/api/api.php:91 { …}
        /var/www/html/sites/all/modules/civicrm/CRM/Admin/Form.php:161 { …}
        /var/www/html/sites/all/modules/civicrm/CRM/Admin/Form.php:77 { …}
        /var/www/html/sites/all/modules/civicrm/CRM/Admin/Form/ScheduleReminders.php:50 { …}
        /var/www/html/sites/all/modules/civicrm/CRM/Core/Form.php:717 { …}
        /var/www/html/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Display.php:76 { …}
        /var/www/html/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php:203 { …}
        /var/www/html/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php:103 { …}
        /var/www/html/sites/all/modules/civicrm/CRM/Core/Controller.php:355 { …}
        /var/www/html/sites/all/modules/civicrm/CRM/Utils/Wrapper.php:98 { …}
        /var/www/html/sites/all/modules/civicrm/CRM/Core/Invoke.php:295 { …}
        /var/www/html/sites/all/modules/civicrm/CRM/Core/Invoke.php:69 { …}
        /var/www/html/sites/all/modules/civicrm/CRM/Core/Invoke.php:36 { …}
        /var/www/html/sites/all/modules/civicrm/drupal/civicrm.module:472 { …}
        /var/www/html/includes/menu.inc:527 { …}
        /var/www/html/index.php:21 { …}
      }
    }
  ]
  
  
  2024-01-15 15:30:56-0800  [debug] $backTrace = #0 /var/www/html/sites/all/modules/civicrm/CRM/Core/Error.php(443): CRM_Core_Error::backtrace(&quot;backTrace&quot;, TRUE)
  #1 /var/www/html/sites/all/modules/civicrm/CRM/Core/Invoke.php(39): CRM_Core_Error::handleUnhandledException(Object(Civi\API\Exception\UnauthorizedException))
  #2 /var/www/html/sites/all/modules/civicrm/drupal/civicrm.module(472): CRM_Core_Invoke::invoke((Array:4))
  #3 /var/www/html/includes/menu.inc(527): civicrm_invoke(&quot;admin&quot;, &quot;scheduleReminders&quot;, &quot;edit&quot;)
  #4 /var/www/html/index.php(21): menu_execute_active_handler()
  #5 {main}
  </code></pre>
  <p>Strangely, they can create new scheduled reminders on events no problem.  But they then cannot edit the event scheduled reminder, not even for reminders they themselves created.</p>
  <p>I don't see any permissions related to scheduled reminders so I'm not sure what permission to grant them.</p>
  <p>This team member was able to create &amp; edit event schedule reminders no problem in our prior version of Civi which...I forget the exact version number but we last upgraded about a year ago.</p>
  <p>I tried reproducing this on dmaster but I don't see a way to create a new Drupal user in dmaster with specific permissions.</p>
  <p>Is this a bug that I should report against core in gitlab, or something else?</p>
  <p>Thank you!</p>
  
Tags: <civievent><scheduled-reminders>
Title: Error when editing (but not creating) event scheduled reminder
ThreadText: # Error when editing (but not creating) event scheduled reminder
  
  (Asked by: username_0 on 2024-01-15)
  
  We have a team member who helps us set up events. We have just upgraded to CiviCRM 5.68.1 on Drupal 7. This error has cropped up only since our upgrade.
  
  This team member has the following permissions:
  
  * CiviCRM: skip IDS check
  * CiviCRM: access CiviCRM backend and API
  * CiviEvent: access CiviEvent
  * CiviEvent: edit event participants
  * CiviEvent: edit all events
  * CiviEvent: register for events
  * CiviEvent: view event info
  
  Notably, they do not have "Administer CiviCRM" since they should only be in here helping us with event creation and management.
  
  When this user clicks to edit an event reminder, we get the following error in the log:
  
  ```
  2024-01-15 15:30:56-0800  [debug] $API Request Authorization failed = #0 /var/www/html/sites/all/modules/civicrm/Civi/API/Kernel.php(151): CRM_Core_Error::backtrace("API Request Authorization failed", TRUE)
  #1 /var/www/html/sites/all/modules/civicrm/Civi/Api4/Generic/AbstractAction.php(256): Civi\API\Kernel->runRequest(Object(Civi\Api4\Generic\DAOGetAction))
  #2 /var/www/html/sites/all/modules/civicrm/api/api.php(91): Civi\Api4\Generic\AbstractAction->execute()
  #3 /var/www/html/sites/all/modules/civicrm/CRM/Admin/Form.php(161): civicrm_api4("ActionSchedule", "get", (Array:1))
  #4 /var/www/html/sites/all/modules/civicrm/CRM/Admin/Form.php(77): CRM_Admin_Form->retrieveValues()
  #5 /var/www/html/sites/all/modules/civicrm/CRM/Admin/Form/ScheduleReminders.php(50): CRM_Admin_Form->preProcess()
  #6 /var/www/html/sites/all/modules/civicrm/CRM/Core/Form.php(717): CRM_Admin_Form_ScheduleReminders->preProcess()
  #7 /var/www/html/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Display.php(76): CRM_Core_Form->buildForm()
  #8 /var/www/html/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display->perform(Object(CRM_Admin_Form_ScheduleReminders), "display")
  #9 /var/www/html/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Admin_Form_ScheduleReminders), "display")
  #10 /var/www/html/sites/all/modules/civicrm/CRM/Core/Controller.php(355): HTML_QuickForm_Page->handle("display")
  #11 /var/www/html/sites/all/modules/civicrm/CRM/Utils/Wrapper.php(98): CRM_Core_Controller->run()
  #12 /var/www/html/sites/all/modules/civicrm/CRM/Core/Invoke.php(295): CRM_Utils_Wrapper->run("CRM_Admin_Form_ScheduleReminders", "Schedule Reminders", (Array:0))
  #13 /var/www/html/sites/all/modules/civicrm/CRM/Core/Invoke.php(69): CRM_Core_Invoke::runItem((Array:17))
  #14 /var/www/html/sites/all/modules/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:4))
  #15 /var/www/html/sites/all/modules/civicrm/drupal/civicrm.module(472): CRM_Core_Invoke::invoke((Array:4))
  #16 /var/www/html/includes/menu.inc(527): civicrm_invoke("admin", "scheduleReminders", "edit")
  #17 /var/www/html/index.php(21): menu_execute_active_handler()
  #18 {main}
  
  2024-01-15 15:30:56-0800  [error]
  $Fatal Error Details = array:3 [
    "message" => "Authorization failed"
    "code" => null
    "exception" => Civi\API\Exception\UnauthorizedException {#2401
      -errorData: array:1 [
        "error_code" => "unauthorized"
      ]
      #cause: null
      -_trace: null
      #message: "Authorization failed"
      #code: 0
      #file: "/var/www/html/sites/all/modules/civicrm/Civi/API/Kernel.php"
      #line: 230
      trace: {
        /var/www/html/sites/all/modules/civicrm/Civi/API/Kernel.php:230 {
          Civi\API\Kernel->authorize($apiProvider, $apiRequest)
          › if (!$event->isAuthorized()) {
          ›   throw new \Civi\API\Exception\UnauthorizedException("Authorization failed");
          › }
        }
        /var/www/html/sites/all/modules/civicrm/Civi/API/Kernel.php:147 { …}
        /var/www/html/sites/all/modules/civicrm/Civi/Api4/Generic/AbstractAction.php:256 { …}
        /var/www/html/sites/all/modules/civicrm/api/api.php:91 { …}
        /var/www/html/sites/all/modules/civicrm/CRM/Admin/Form.php:161 { …}
        /var/www/html/sites/all/modules/civicrm/CRM/Admin/Form.php:77 { …}
        /var/www/html/sites/all/modules/civicrm/CRM/Admin/Form/ScheduleReminders.php:50 { …}
        /var/www/html/sites/all/modules/civicrm/CRM/Core/Form.php:717 { …}
        /var/www/html/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Display.php:76 { …}
        /var/www/html/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php:203 { …}
        /var/www/html/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php:103 { …}
        /var/www/html/sites/all/modules/civicrm/CRM/Core/Controller.php:355 { …}
        /var/www/html/sites/all/modules/civicrm/CRM/Utils/Wrapper.php:98 { …}
        /var/www/html/sites/all/modules/civicrm/CRM/Core/Invoke.php:295 { …}
        /var/www/html/sites/all/modules/civicrm/CRM/Core/Invoke.php:69 { …}
        /var/www/html/sites/all/modules/civicrm/CRM/Core/Invoke.php:36 { …}
        /var/www/html/sites/all/modules/civicrm/drupal/civicrm.module:472 { …}
        /var/www/html/includes/menu.inc:527 { …}
        /var/www/html/index.php:21 { …}
      }
    }
  ]
  
  2024-01-15 15:30:56-0800  [debug] $backTrace = #0 /var/www/html/sites/all/modules/civicrm/CRM/Core/Error.php(443): CRM_Core_Error::backtrace("backTrace", TRUE)
  #1 /var/www/html/sites/all/modules/civicrm/CRM/Core/Invoke.php(39): CRM_Core_Error::handleUnhandledException(Object(Civi\API\Exception\UnauthorizedException))
  #2 /var/www/html/sites/all/modules/civicrm/drupal/civicrm.module(472): CRM_Core_Invoke::invoke((Array:4))
  #3 /var/www/html/includes/menu.inc(527): civicrm_invoke("admin", "scheduleReminders", "edit")
  #4 /var/www/html/index.php(21): menu_execute_active_handler()
  #5 {main}
  
  ```
  
  Strangely, they can create new scheduled reminders on events no problem. But they then cannot edit the event scheduled reminder, not even for reminders they themselves created.
  
  I don't see any permissions related to scheduled reminders so I'm not sure what permission to grant them.
  
  This team member was able to create & edit event schedule reminders no problem in our prior version of Civi which...I forget the exact version number but we last upgraded about a year ago.
  
  I tried reproducing this on dmaster but I don't see a way to create a new Drupal user in dmaster with specific permissions.
  
  Is this a bug that I should report against core in gitlab, or something else?
  
  Thank you!
  
  **Tags:** civievent, scheduled-reminders
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2024-03-11. Score: 0
  
  Upgrading CiviCRM from 5.69.3 to 5.69.5 fixed this issue for us.
  
  
  ---
  
  