Permission issues after uninstall module with custom entity

Created on 11 July 2023, almost 2 years ago
Updated 30 July 2024, 9 months ago

Problem/Motivation

I had a module with a custom content entity, by example "model"
I had entity clone installed
I used permission 'clone model entity' on my role webmaster
I used drupal 10 but maybe occured in 9.5

Steps to reproduce

I uninstall my module with the custom content entity
I got a runtime exception:

In Role.php line 207:

Adding non-existent permissions to a role is not allowed. The incorrect permissions are "clone model entity".

Proposed resolution

Add a hook that remove the permission from all roles before a custom entity is uninstalled from Drupal

🐛 Bug report
Status

Closed: works as designed

Version

2.0

Component

Code

Created by

🇫🇷France tichris59

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

Comments & Activities

Production build 0.71.5 2024