Body: <p>On a fairly fresh installation I deactivated the Events component and get the following error when trying to save Drupal's user permissions:</p>
  <blockquote>
  <p>RuntimeException: Adding non-existent permissions to a role is not
  allowed. The incorrect permissions are &quot;register for events&quot;, &quot;view
  event info&quot;, &quot;view event participants&quot;. in
  Drupal\user\Entity\Role-&gt;calculateDependencies() (line 207 of
  /opt/drupal/web/core/modules/user/src/Entity/Role.php).</p>
  </blockquote>
  <p>It does not occur with active Events component and unchecking those three permissions and then disabling Events fixes it as well. Is this a (Drupal) bug?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-11-19T17:29:25.453Z
Comments.Text: Something similar came up a while ago but it seemed fixed: https://lab.civicrm.org/dev/core/-/issues/4413
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-01-07T15:13:26.150Z
Comments.Text: Have just hit the same after disabling CiviMail in Drupal 10.2&CiviCRM 5.68.0,
Comments.UserDisplayName: yurg
Tags: <civievent><drupal><permissions>
Title: Error saving role permissions in Drupal 10
ThreadText: # Error saving role permissions in Drupal 10
  
  (Asked by: username_0 on 2023-11-19)
  
  On a fairly fresh installation I deactivated the Events component and get the following error when trying to save Drupal's user permissions:
  
  > RuntimeException: Adding non-existent permissions to a role is not
  > allowed. The incorrect permissions are "register for events", "view
  > event info", "view event participants". in
  > Drupal\user\Entity\Role->calculateDependencies() (line 207 of
  > /opt/drupal/web/core/modules/user/src/Entity/Role.php).
  
  It does not occur with active Events component and unchecking those three permissions and then disabling Events fixes it as well. Is this a (Drupal) bug?
  
  **Tags:** civievent, drupal, permissions
  
  > **Comments:**
  > **username_1**: Something similar came up a while ago but it seemed fixed: https://lab.civicrm.org/dev/core/-/issues/4413  
  > **username_2**: Have just hit the same after disabling CiviMail in Drupal 10.2&CiviCRM 5.68.0,  
  
  ---
  
  ## 0 answers
  
  