I cannot disable the relation module. The check box is disabled and in the description it has the following:

Required by: Drupal (Field type(s) in use - see Field list), Relation Dummy Field (disabled), Relation Entity Collector block (disabled)

I have checked and I can't find any other enabled modules that requires the relation module.

Comments

naught101’s picture

Title: Cannot disable module » Cannot disable module - split off endpoints field into sub-module
Category: bug » task
Priority: Normal » Major
Issue tags: +D7 stable release blocker

It's not modules, it's the endpoints field that requires it to be enabled. Apparently this is related to a just-dealt-with critical core bug that's just been fixed: #943772: field_delete_field() and others fail for inactive fields

Catch says that that basically means that we need to split the endpoints field out into a separate helper module (so that we can delete the field data and instances on relation.module uninstall, and then remove the helper module).

As a work around, if you want to remove relation, just delete all the relation types first. Then the field won't be in use, and you should be able to uninstall relation.module fine.

Thanks for the report!

vasike’s picture

Priority: Major » Critical

subscribe

mattyohe’s picture

Priority: Critical » Major

vasike: I don't think it makes much sense to re-categorize the priority for an issue that was already set by the maintainer.

I ran into this same issue, and while removing all the relation types still did not seem to fix the problem, manually removing the relation endpoint field from the field_config table allowed me to disable the module.

naught101’s picture

Status: Active » Fixed

Fixed in commits 2cb4c39 and 247044b

This worked for me fine. If you want to uninstall now:
- Upgrade to the latest -dev. Update the database (eg. visit the site status report, or drush updb)
- Disable all modules depending on relation
- Disable relation
- Uninstall all modules depending on relation
- Uninstall relation
- Disable relation_endpoints
- Uninstall relation_endpoints

If that doesn't work, please re-open.

Sorry about the complexity, that's basically a problem with drupal core ATM (See #1199946: Disabled modules are broken beyond repair so the "disable" functionality needs to be removed). If you just want to disable relation, you don't need to do the last 4 steps. It's perfectly fine to leave relation_endpoints enabled (it doesn't do anything by itself anyway).

Status: Fixed » Closed (fixed)

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

davidcsonka’s picture

Version: 7.x-1.0-beta1 » 7.x-1.0-beta3
Status: Closed (fixed) » Active

I am unable to disable "Relation Endpoints Field" because the field is checked "on", but is grayed out, preventing me from disabling it. Because of this, I cannot uninstalled "relation_endpoints".

Is that working as intended?

AlanO’s picture

I cannot uninstall endpoints as well. It is grayed out and not able to select for uninstalling.

naught101’s picture

Hrm. Did you have any relation types defined before you disabled relation.module? you might need to delete all relation types before disabling.

AlanO’s picture

No relations but I did install, but not enabled, a few extra modules for relation and had that issue fixed. The relation select and the relation edit widget were the extra modules I downloaded(non installed) and the field was then able to become unselected. So one of those modules or maybe both affected it somehow.

davidcsonka’s picture

Component: Code » API

Update: checked the uninstall.txt file in the module folder. Important to run cron after disabling the other Relation sub-modules. Eventually allowed me to uninstall endpoints. However, the files and module were not removed from the main modules list.

naught101’s picture

Status: Active » Postponed (maintainer needs more info)

What do you mean "the files and module were not removed from the main modules list"?

davidcsonka’s picture

After going through the uninstall process, the modules remain in the list of modules which can be activated. I was under the impression that uninstalling should remove them.

naught101’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

No, that's something you have to do, as with all modules: http://drupal.org/node/250783

davidcsonka’s picture

Ok, my bad. Sorry to bother. So, the act of "uninstalling" is just removing records in the database then? Sort of a clean up procedure, but not touching any files? Thanks!

naught101’s picture

Exactly, so the process is three parts: disable (turn off code), uninstall (remove all config/content from database), and delete (code from server).

dewancodes’s picture

I just install all relation modules except "Relation Endpoints Field" , and after that I clear drupal cachec, then run cron, then I went back on /admin/modules page, and I see that "Relation Endpoints Field" is highlited to be un-install, then I un-install "Relation Endpoints Field" module successfully also from un-install section as well "/admin/modules/uninstall".

Enjoy :)

Thanks

dewancodes’s picture

did my solution for you?

prinds’s picture

The solution proposed by dewanhkf worked for me, though i didn't need to clear cache.. I was unable to disable Relation Endpoints Field

to sum up
1. disabled and uninstalled the Relation module
2. ran cron
3. disabled and uninstalled Relation Endpoints Field

dzieyzone’s picture

thanks for this solution, indeed, it works!

Anonymous’s picture

Never, ever, ever, ever make the mistake of installing this module!

naught101’s picture

Try to keep it constructive derek. If you have a problem that isn't solved by #4 or #1742150: Looped dependencies of modules, please give some actual detail, so that we can help you.

jaydee1818’s picture

I'm having the same problem. Deleted any relations created. Disabled Relation UI, Entity Collector Block. Disabled Relation. Ran Cron. relation Endpoints Field still greyed out and enabled. Any help?

naught101’s picture

Did you delete all the relation types before disabling relation?

jaydee1818’s picture

yes ... I only created one to see how it worked ... and then removed it.

pedrosp’s picture

Same here, but solved disabling AND uninstalling all relation related modules, then cron to delete fields, then I was able to disable and uninstall Relation Endpoints Field.
Relation is freaking awesome btw ;) - just uninstalling on a dev.