Dependencies of modules Relation Endpoints Field and Relation Dummy Field are closed to each other.
Therefore can not be uninstalled!

Comments

mikran’s picture

Category: bug » support

Relation Dummy Field has dependency to Relation only. Try running cron after disabling dummy field and you should be able to uninstall it afterwards.

3magnus’s picture

Category: support » bug

Same here. I had three relation types and only one field using the Relation module.

After I've given up on using relations I deleted the field and tried to disable and uninstall Relations module. Everything was going right until the Relation Endpoints Field module (as @lancee), wich is locked for disabling and there no other Relation module left to disable!

So I re-enabled both Relation and Relation UI and manually deleted every single relation created. Then I re-disabled both of them and ran cron.

Finally, here I am. Stuck with the lock-for-disabling Relation Endpoints Field module and asking for support.

As I'm just working on a test site, this little bug (pretty normal for a fresh module) won't cause me any trouble. I'm just reporting to help you guys.

Great project, by the way!

blackclover’s picture

Priority: Normal » Critical

Need to uninstall Relation Endpoints Field but it's locked. Uninstalled all the relate modules then deleted a field used as an endpoint and now I get an error on that content type.

Notice: Undefined index: entity_from_field:field_crm_org_primary_contact-node-node in ctools_entity_from_field_get_child() (line 24 of /home/edelib/public_html/sites/all/modules/ctools/plugins/relationships/entity_from_field.inc).

blackclover’s picture

Sorry wrong error message. But still want to uninstall it. thanks

Taxoman’s picture

Version: 7.x-1.0-rc3 » 7.x-1.x-dev

Just for clarity:

Can anyone describe a method that currently works (order of doing things), so that we can be sure that as long as we do not mess this up by taking the steps in the wrong order, it is indeed possible to uninstall this module? If it is actually impossible, then that is important and deserves a warning on the module page.

(I am considering to start testing this module, but reluctant until I know I can expect to be able to uninstall it...)

naught101’s picture

Priority: Critical » Normal
Status: Active » Closed (works as designed)

There are no looped dependencies. The uninstallation procedure is a little involved, but relatively simple:

  1. Delete all dummy fields on all entities (nodes, users, etc). Also remove any other relation fields provided by external modules (e.g. relation_add).
  2. Disable all modules that depend on Relation (including the Entity collector etc.)
  3. Delete all relation types. You may need to run cron or clear caches after this step. This missing step is the cause of the problem for 3magnus and blackclover. The confusion arises because the endpoint field is a hidden field used only on relations (this stores the endpoints of each relation). This is totally separate from the relation dummy field, or any other relation field that edits or displays relations
  4. Disable and uninstall Relation
  5. Disable and uninstall relation_endpoint.

Unfortunately, there is no way to make this easier, because of the two-step uninstallation of drupal modules. We could delete all relation types when we disable relation, but then that wouldn't be disabling, because disabling a module isn't supposed to remove data. We would like to delete all relation types when we uninstall relation, but at that stage, the relation code is not available, so we can't really do anything. Catch 22.

frederickjh’s picture

Issue summary: View changes

For anyone finding this the instructions above did not work for me to uninstall version 7.x-1.0-rc5. I had to run cron after uninstalling the Relation module. So the steps would look like this.

  1. Delete all dummy fields on all entities (nodes, users, etc). Also remove any other relation fields provided by external modules (e.g. relation_add).
  2. Disable all modules that depend on Relation (including the Entity collector etc.)
  3. Delete all relation types. You may need to run cron or clear caches after this step. This missing step is the cause of the problem for 3magnus and blackclover. The confusion arises because the endpoint field is a hidden field used only on relations (this stores the endpoints of each relation). This is totally separate from the relation dummy field, or any other relation field that edits or displays relations
  4. Disable and uninstall Relation
  5. Run cron
  6. Disable and uninstall relation_endpoint.

Not sure if the first cron run is needed, but these are the steps I followed to uninstall it.

I hope this helps someone!