During installation of this module an error happens (cfr #2599042: Make D8 release of Visitors work again for details).

So I decided to uninstall the Visitors module, but I couldn't.

Instead I got this error in Drush:

Drupal\Core\Config\ImmutableConfigException: Can not delete immutable configuration visitors.config. Use \Drupal\Core\Config\ConfigFactoryInterface::getEditable() to retrieve a mutable configuration [error]
object in /var/www/drupal/core/lib/Drupal/Core/Config/ImmutableConfig.php:51

Now I cannot install or remove any new modules in my site. Please help.

Comments

omlx created an issue. See original summary.

Pierre.Vriens’s picture

Status: Active » Closed (duplicate)
Related issues: +#2599042: Make D8 release of Visitors work again

@omix: you issue is similar to what is mentioned in #2599042: Make D8 release of Visitors work again, so I'm marking it like so.

Though I think it might help others if you can add some kind of update about if you somehow succeeded by now to get around this issue.

Pierre.Vriens’s picture

Title: unenable to uninstall in D8 » Unable uninstall the D8-2.0 release
Category: Bug report » Support request
Priority: Critical » Major
Pierre.Vriens’s picture

Title: Unable uninstall the D8-2.0 release » Unable to uninstall the D8-2.0 release
Issue summary: View changes

As per this comment in issue #2599042: Make D8 release of Visitors work again, a work around (for now) to this problem is to replace this line in visitors.install, which currently looks like so:

\Drupal::config('visitors.config')->delete();

It should be replace by a line that looks like so:

\Drupal::configFactory()->getEditable('visitor.config')->delete();

Credits: omlx

Duarte Cancela’s picture

Thanks! work for me.