Dynamic Permissions are not cleared, when Transitions are removed.

Created on 21 April 2024, 8 months ago
Updated 29 May 2024, 7 months ago

Problem/Motivation

The website encountered an unexpected error. Try again later.

RuntimeException: Adding non-existent permissions to a role is not allowed. The incorrect permissions are "use task_workflow transition activate", "use task_workflow transition approving", "use task_workflow transition finished". in Drupal\user\Entity\Role->calculateDependencies() (line 207 of core/modules/user/src/Entity/Role.php).
Drupal\Core\Config\Entity\ConfigEntityBase->preSave(Object) (Line: 179)
Drupal\user\Entity\Role->preSave(Object) (Line: 528)
Drupal\Core\Entity\EntityStorageBase->doPreSave(Object) (Line: 483)
Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 257)
Drupal\Core\Config\Entity\ConfigEntityStorage->save(Object) (Line: 354)
Drupal\Core\Entity\EntityBase->save() (Line: 609)
Drupal\Core\Config\Entity\ConfigEntityBase->save() (Line: 1004)

Steps to reproduce

I have many workflows defined. On one of them, for a node type called "Task", I had like 7 States and a bunch of transitions. I deleted 2 states and edited the transitions and moved on. Now after 2 days, I had to edit the permissions and when I saved I get this error presented. The thing is, that these permissions "use XYZ transition" seem to not exist any longer. Therefore I cannot remove or edit them. To fix that I have to use SQL or PHP, I guess. Currently I have no idea where to search, but it will take some time.

🐛 Bug report
Status

Closed: duplicate

Version

1.7

Component

Code

Created by

🇩🇪Germany ro-no-lo

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024