- Issue created by @saarlandtoday
- 🇮🇳India zartab farooquee
Can you explain how you uninstalled the Flag module? Did you do it via the admin interface or command line?
- ivnish Kazakhstan
Sometimes this happens with different contrib modules. But I can't reproduce this now. Needs more info and more steps to reproduce
- 🇺🇸United States tr Cascadia
This is caused by the core issue #2571235: [regression] Roles should depend on objects that are building the granted permissions →
What is happening is that Flag defines permissions which are assigned to Roles, which adds a Flag dependencies to the Role configuration entities. When Flag is then uninstalled, the Role configuration entities are also deleted because they are missing dependencies.
This affects both the Anonymous and Authenticated roles, as well as any other role that has Flag permissions.
The fix involves modifying
FlagPermissions
as described in the change record Permissions can define dependencies →I wrote a test case for another module to demonstrate this issue last year - I'll try to dig it up and re-write it for Flag. That way we will have something to prove the fix.