Score:1

uninstall module that depends on relation module, which is disabled

in flag

I am a maintainer of the crm_core module. The Drupal7 version depends on the relation module to provide relationships between contacts. The depend module can not be uninstalled while the relation module is disabled.

Is there a solution? Or, is this one of the limitations of disabling modules, which might be why disable was dropped in Drupal8.

2273255 - Can't uninstall crm_core_relationship when relation module has been disabled

Score:0
us flag

The issue described in Can't uninstall crm_core_relationship when relation module has been disabled is that crm_core_relationship_uninstall() is calling functions defined in a disabled module. When a module is disabled, Drupal won't load it, and all the module functions won't be available.

Either crm_core_relationship_uninstall() first loads that module file with drupal_load('module', 'relation'), before calling its functions, or the code in relation_delete() and relation_type_delete() is duplicated in functions accessible from crm_core_relationship_uninstall().

That issue isn't present in Drupal 8, as in Drupal 8 modules can only installed or not installed; they cannot be anymore disabled as in Drupal 7.

Binary Alchemist avatar
in flag
I used the drupal_load function, and it works! [changes](https://git.drupalcode.org/issue/crm_core-2273255/-/compare/7.x-1.x...2273255-unintall-disabled-relation?w=1)
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.