Problem/Motivation

When I uninstall the module and try to install it again I get the following exception:

Drupal\Core\Config\PreExistingConfigException: Configuration objects (single_role.settings) provided by role already exist in active configuration in /var/www/draft/docroot/core/lib/Drupal/Core/Config/PreExistingConfigException.php:65

Proposed resolution

Implement a hook_uninstall() in modules install file and remove active configuration
\Drupal::configFactory()->getEditable('single_role.settings')->delete();

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

oyushchenko created an issue. See original summary.

Oleksandr Yushchenko’s picture

Assigned: Unassigned » Oleksandr Yushchenko
Oleksandr Yushchenko’s picture

Assigned: Oleksandr Yushchenko » Unassigned
Status: Active » Needs review
FileSize
373 bytes

  • ozin committed 44d4a98 on 8.x-1.x authored by oyushchenko
    Issue #3084634 by oyushchenko, ozin: Remove role configurations on...
ozin’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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