Hello,

When you uninstall the module, and then try to install it again, Drupal return an error message :

"Can't install Rate, views.view.rate_regulsts, votingapi.vote_type.fivestar, votingapi.vote_type.updown already exists in active configuration".

Sounds critical as it prevent to install the module.

Comments

Alexandre360 created an issue. See original summary.

jordik’s picture

Received the same error. Here is a quick fix, which helped me.

You can use drush to delete the entries in the config table:
drush sql-query "DELETE FROM config WHERE name ='views.view.rate_results';"
drush sql-query "DELETE FROM config WHERE name ='votingapi.vote_type.fivestar';"
drush sql-query "DELETE FROM config WHERE name ='votingapi.vote_type.updown';"
drush sql-query "TRUNCATE TABLE cache_config;"

Or you can execute the same SQL-queries in phpmyadmin.

Alexandre360’s picture

Hello,

Thank you for your reply, I cleaned the config directly with phpmyadmin and it worked.

mikechr’s picture

I've added an enforced dependency on the configuration created by the module. this way when you uninstall the module the configuration will also be removed.

However this won't fix, if you have already installed and uninstalled the module. Since the configuration has already been created.
In such a case use #2 to manually delete the configuration and then patch the module and reinstall.

mikechr’s picture

Status: Active » Needs review
mikechr’s picture

I've removed the enforced dependency added in #4 patch and instead added the configuration as optional
Patch #4 is more ideal since these dependencies are not optional

Status: Needs review » Needs work

The last submitted patch, 6: remove_configuration_on_uninstall-2975746-6.patch, failed testing. View results

mikechr’s picture

mikechr’s picture

Status: Needs work » Needs review

  • kevin.dutra committed 1834366 on 8.x-1.x
    Issue #2975746 by Mikechr: Module don't uninstall properly
    
kevin.dutra’s picture

Status: Needs review » Fixed

Makes sense -- committed. Thanks!

Status: Fixed » Closed (fixed)

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