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

  1. drush en cucumber_user_role_designer -y
  2. drush pmu cucumber_user_role_designer -y
  3. drush 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
Command icon 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

rajab natshah created an issue. See original summary.

  • rajab natshah committed 3fdfb6e5 on 12.0.x
    fix: #3637876 Remove the role and the dashboard of a role module on...
rajab natshah’s picture

Issue summary: View changes
Status: Active » Fixed

Merged in !20, pipeline 1045276 green.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

rajab natshah’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.