Jump to:
| Project: | Drupal core |
| Version: | 7.x-dev |
| Component: | user system |
| Category: | bug report |
| Priority: | critical |
| Assigned: | sun |
| Status: | closed (fixed) |
| Issue tags: | API clean-up |
Issue Summary
When "Disable developer modules" is triggered, developer modules are disabled. Visiting and submitting the permissions form on admin/user/permissions will thereby remove all permissions of disabled developer modules.
Actually, this is a Drupal core bug. Only not installed/uninstalled modules should be left out in the permissions form. Disabled modules can be re-enabled at any time.
So we have 4 options to fix this:
1) Output a message on top of the form to allow the user to re-enable the disabled developer modules, so they do not lose any data.
2) Use hook_init() to re-enable any disabled developer modules on that page, and hook_form_alter() to add a submit handler to the form to disable them again. (Will fail when user only visits the page, but does not submit the form.)
3) Use hook_form_alter() to add all disabled developer modules to the form.
4) Move this issue to Drupal core and fix the underlying bug there.
Comments
#1
After discussion with dww, let's move this to Drupal core.
#2
IMHO, this is a core bug, not something admin menu should be hacking around. I don't think I'd call this "critical", but it's close. Someone's probably going to call this "by design", since it's a "feature" that when you save the permissions page, everything gets "cleaned up". But, it sure makes for hellish UX for admins if they disable a module with a lot of permissions, save the permissions page, and then re-enable things...
#3
For now, assigning to myself to keep track of this issue. Waiting for the revert of the registry to come up with an initial attempt.
#4
Introducing a new tag for feature freeze: API clean-up.
#5
#300993: User roles and permissions API seems like it could vastly help to fix this issue.
#6
Based on manual testing, #300993: User roles and permissions API fixed this issue.
Marking as fixed. We could re-open this issue though to add some tests ;)
#7
Automatically closed -- issue fixed for 2 weeks with no activity.