Timeline for How to remove mymodule configurations on uninstall
Current License: CC BY-SA 3.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 19, 2020 at 13:01 | review | Suggested edits | |||
Aug 19, 2020 at 16:22 | |||||
Aug 8, 2017 at 20:50 | comment | added | Daniel Schiavone | This solution works for disabling parent modules when you have a sub-modules. Otherwise when using itself as a dependency you will not be able to re-enable your module. | |
Nov 29, 2016 at 14:51 | comment | added | J-P |
I think the "problem" here was that I was trying this out with purely example data, whereas: (a) ConfigDependencyManager::$data only has entries that have a UUID (so views.settings isn't even present); and (b) ConfigManager::findConfigEntityDependentsAsEntities() filters out anything with an unrecognized config prefix (so if your module decides to set views.foo on Views' behalf, it won't be recognized). Basically: "'enforced:' only makes sense for config_entity" is the key, but I don't think that's necessarily clear.
|
|
Nov 29, 2016 at 10:43 | comment | added | J-P |
"Note that this only works for new installations, it won't fix existing ones." - is there any manual SQL tweak that will fix this? I've tried DELETE FROM config WHERE ... and a drush cr after pm-uninstall but when I next en /pm-uninstall , the enforced: is still not respected. Is the dependency tree stored elsewhere?
|
|
Sep 5, 2016 at 0:09 | comment | added | Berdir | Normal dependencies are calculated by code. Just becaouse you define a node type doesn't mean that anything specifically depends on your module. Saving a config entity re-calculates dependencies and your module will not be in that list.. unless you explicitly add it as an enforced dependency. | |
Sep 4, 2016 at 23:20 | comment | added | UnsettlingTrend | Any explanation for the "enforced" bit? I mean, a dependency is a dependency. Isn't its enforcement a given? Is that's what's necessary for the uninstall? | |
Jul 7, 2016 at 16:44 | comment | added | colan | Looks like this approach doesn't work with Entity Reference fields at the moment. I created a bug report: Config entities removed in wrong order causes PDOException | |
Mar 2, 2016 at 12:18 | comment | added | arpitr | I just observed on un-installing a module in d8, drupal cleans-up all the configuration. I had some configurations on config/install/module.settings.yml I installed the module, looked into config db table, I could see the configurations in the table, then I simply uninstalled the module re-check the config table and configurations are gone! Am I missing something here? | |
Sep 10, 2015 at 12:33 | vote | accept | Ahmad | ||
Sep 10, 2015 at 11:00 | history | answered | Berdir | CC BY-SA 3.0 |