I've run across a few instances where I've been testing something using this module and added the field to my entity (user or node, doesn't matter), then try to disable and drupal's wonderful new "feature" that doesn't allow you to disable a module if it has fields it created that are in use kicks in. so i go delete my test field and i still can't uninstall the module. i have had to delete items from the field_config, field_config_instance, cache_field, etc. until i've removed every trace of my field from the database and then i can disable and uninstall the module. It could very well be something i'm doing, i don't know but putting this out there in case others may be having the same issue...

Comments

johnv’s picture

Status: Active » Closed (works as designed)

As with any other Field, Drupal forces you to remove the field first from you rcontent, before you can disable/uninstall the xyz-Field module.

This works as expected, since this module does not do any install-actions itself.

I tried to recreate your situation
- Enable the module
- Add the field to a content type
- Add a node, fill the OH field data.
- Visit the admin/modules page, you cannot disable the module, but Drupal links to the Feld list.
- Visit the field list; from there, go to the content type settings page.
- Remove the field from the content type. (Deleting data from the database!!)
- Visit the admin/modules page again, you cannot disable the module, since the following message appears
"Required by: Drupal (Fields pending deletion)"

So, how to delete those pending data?
- Visit admin/config/system/cron, run cron.

Now disable/uninstall the module.
- Visit the admin/modules page again, you now can disable the module.
- Visit the admin/modules/uninstall page; although there is nothing to uninstall, the module is in the list.
- Uninstall the module.

scotwith1t’s picture

thanks johnv. i think the part i was skipping was running cron to clear the "pending deletion" field...wow, who thought that was a good idea!!?? i remember seeing a couple posts about this a while back and the frustrations it's causing now that you mention that. i'll keep it in mind. thx.

johnv’s picture

Well, I never found this documented anywhere. I stumbled upon it some months ago. :-)

knalstaaf’s picture

Issue summary: View changes

I did run cron, cleared all caches, ran update.php - it's not helping.

EDIT: It took a little digging in the database.

Apparently the fields aren't getting removed form my database, eventhough I run cron on my multilingual (Entity Translation) multidomain (Domain Access) website.

I had to manually remove them from the following tables:

  • field config (search in the column type for "office_hours", remember the according field name)
  • field_config_instance (search by its field name)

Once that's done, the module can be disabled and deinstalled. I'm not sure if this would only occur on my installation, hence I'm leaving this thread on "works as designed".

manoloka’s picture

I found this problem and I was able to uninstall the module by deleting any fields related to it and clearing caches