Problem/Motivation
Uninstalling a role module, for example cucumber_user_role_designer, keeps user.role.designer, webdashboard.webdashboard.designer_dashboard and the designer flag in cucumber_user_roles.settings (the settings form keeps the role ticked and disabled). Installing the module again stops on the configuration that stayed behind. The same goes for the six role modules.
In PreExistingConfigException.php line 65: Configuration objects (user.role.designer, webdashboard.webdashboard.designer_dashboard) provided by cucumber_user_role_designer already exist in active configuration
Seen on Cucumber User Roles 12.0.x-dev (12.0.6), Drupal 11.4.12, PHP 8.3.
Steps to reproduce
drush en cucumber_user_role_designer -ydrush pmu cucumber_user_role_designer -ydrush en cucumber_user_role_designer -y: the error above.
Proposed resolution
Make the role and the dashboard of each role module depend on their module (an enforced dependency in config/install, and an update function for installed sites), so Drupal removes them on uninstall, and turn the role off in cucumber_user_roles.settings in hook_uninstall().
Remaining tasks
- ✅ File an issue
- ✅ Addition/Change/Update/Fix
- ✅ Testing to ensure no regression
- ➖ Automated unit/functional testing coverage
- ➖ Developer Documentation support
- ✅ User Guide Documentation support
- ➖ UX/UI designer responsibilities
- ➖ Accessibility and Readability
- ❌ Reviewed by a human
- ❌ Code review by maintainers
- ❌ Full testing and approval
- ❌ Credit contributors
- ❌ Review with the product owner
- ❌ Update Release Notes
- ❌ Release
User interface changes
- N/A
API changes
- N/A
Data model changes
- The role and the dashboard of a role module get an enforced dependency on that module: uninstalling the module removes them.
Release notes snippet
- fix: #3637876 Remove the role and the dashboard of a role module on uninstall
Issue fork cucumber_user_roles-3637876
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
rajab natshahMerged in !20, pipeline 1045276 green.
Comment #6
rajab natshah✅ Released cucumber_user_roles 12.0.7