Removing a permission for a field breaks global permissions

Created on 30 January 2025, 4 months ago

Problem/Motivation

If I add permissions to a field, then remove those permissions at a later date it becomes impossible to save the global permissions page (/admin/people/permissions) due to the following error :

RuntimeException: Adding non-existent permissions to a role is not allowed. The incorrect permissions are "create field_map_override_image", "edit field_map_override_image", "edit own field_map_override_image", "view field_map_override_image", "view own field_map_override_image". in Drupal\user\Entity\Role->calculateDependencies() (line 210 of /www/live/ato1-008/web/core/modules/user/src/Entity/Role.php).

I had to uninstall the field_permission module to get the permissions page to save again.

Drupal core: 10.4.1
Field permission: 8.x-1.4

🐛 Bug report
Status

Active

Version

1.4

Component

Code

Created by

🇬🇧United Kingdom mistergroove

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

Comments & Activities

Production build 0.71.5 2024