Disabling a module which hold custom field(s) definition isn't possible; Drupal claiming "Required by: Drupal (Field type(s) in use - see Field list)"
even if no instance of its field(s) exists.
In a normal situation this message occur when some data exists for the culprit field.
Running cron should empty the data but as the batch size is set to 10 (according to field_cron) more than one cron might me necessary. Alternatively this method can be tried: #1284332-14: Module cannot be disabled because Drupal claim "Field type(s) in use".
Developer information: Moving field(s) definitions into a separate module of a installed module.
Comment | File | Size | Author |
---|---|---|---|
#13 | phpMyAdmin-Table-field-config-instance.png | 53.99 KB | flexicode |
Comments
Comment #1
pillarsdotnet CreditAttribution: pillarsdotnet commentedThis information needs to move to a documentation page, and then a patch can change the "cannot uninstall" error message to refer to that documentation page.
Comment #2
drikc CreditAttribution: drikc commentedI've done the documentation page. For the patch that make a link to it I'm not sure because the message could refer to another issue needing other solution.
Comment #3
pillarsdotnet CreditAttribution: pillarsdotnet commentedNeed a link to the documentation page, please.
Comment #4
drikc CreditAttribution: drikc commentedComment #5
pillarsdotnet CreditAttribution: pillarsdotnet commentedAh, I see. By "documentation" page you are probably referring to Moving field(s) definitions into a separate module of a installed module.
Hmm...
That page has multiple problems:
Comment #6
pillarsdotnet CreditAttribution: pillarsdotnet commentedAdded an API change node: Field types should be defined by one module and implemented by a separate module.
Comment #7
pillarsdotnet CreditAttribution: pillarsdotnet commentedAlso see #1199946-17: Disabled modules are broken beyond repair so the "disable" functionality needs to be removed
Comment #8
flexicode CreditAttribution: flexicode commentedI come from the other two popular and user friendly cms's background, Many warned me Drupal is not 'easy' but I took the plunge looking at the possibilities and it has been a while I am trying to complete one project in D7 without much success so far. Every now and then I find myself re-constructing my broken site than doing anything worthwhile. Now I am stuck here trying to figure out what to do. The writeup is too technical for me to follow. I have been warned not to finger the core.
I tried to test the media module (that I was following for a long time) and the media gallery module. I was delighted to know that media has finally advanced one step into a release candidate. Media Gallery module, after installation, declares that it is not compatible with media 7.1rc so I had to uninstall it and install what media gallery was looking for (7.1 beta5). I was happy to learn that the gallery has been installed, however when I tried to reach to my home page, I was thrown to my (admin's) profile page. Thinking that things might just not work out I turned back to disable the media thing along with the dependencies but it wouldn't.
Can someone help me solve the problem in a 'not so technical' language or should I consider turning back to my old pals after somehow completing this project, although I consider myself a hobbyist with enough knowledge of web technologies to make dynamic websites but Drupal appears to be a little too hot for me to handle.
Comment #9
anruetherAfter deleting the fields that were used with Media, I still can't disable Media module. Is there a way to disable the Media module right now?
Comment #10
drikc CreditAttribution: drikc commentedTry to manually delete the field info in the field_config table in order to disable the module.
Comment #11
flexicode CreditAttribution: flexicode commentedI am on Drupal 7.8 stable and my modules list page shows "Required by: Drupal (Field type(s) in use - see Field list)" for the following modules...
CORE....
=============
File
Image
List
Number
Taxonomy
Text
OTHERS
=============
Date
Email
Node Reference
Node Reference Count
Media
Organic Groups
Meaning I won't be able to disable these modules if I ever want to. Is there anything that could be done to be out of this situation. Any suggestion, advice, workaround would be much appreciated.
Comment #12
drikc CreditAttribution: drikc commentedThere is two cases which can produce this situation:
1. Normal situation: a module field type is instanced (in use).
2. Abnormal situation: a module is implementing its own field definitions which since 7.8 must be implemented in a separate module, see this API change.
In case 2, you can either wait for a module update or delete the field info in table field_config.
Comment #12.0
drikc CreditAttribution: drikc commentedMoved content to a documentation page.
Comment #13
flexicode CreditAttribution: flexicode commentedI deleted the field info in table field_config after that I was able to disable 'Media Gallery' and 'Media' modules and access my home page, however I still see some stale fields and data in the database table 'field_config_instance'. What should I do with those data? Please refer to the attached snap shot taken after completely uninstalling & removing the media_gallery & media modules.
Thanks for your solution drikc, it really helped.
Comment #14
drikc CreditAttribution: drikc commentedYes you could delete also the field info in field_config_instance and the field tables if you dont need its datas.
Comment #15
flexicode CreditAttribution: flexicode commentedDid the same and things are back on track, will avoid going near media or media gallery anytime soon though :)
You were a great help drikc, You rescued me from a hopeless situation. Thanks a lot.
Have nicer days ahead. :)
Comment #16
Jim Kirkpatrick CreditAttribution: Jim Kirkpatrick commentedSubscribe... Got same issue when uninstalling the not-ready-yet Relation modules... Deleted all content, then deleted content type using a field for relationship endpoints, then uninstalled modules only to not be allowed to disable the now-unused Relation Endpoints Field module.
Something's not tidying itself properly, and D7 prevents the user doing it themselves by uninstalling. Nothing relevant shown at admin/reports/fields...
I deleted the offending rows from field_config (nothing relevant in field_config_instance) then the problem went away.
Comment #17
flexator CreditAttribution: flexator commentedsame issue. I had the Problem too and deleted the fields in field_config and all was good.
Comment #18
ouyang1512 CreditAttribution: ouyang1512 commentedI am having the same issue. What I am trying to do is update the core from 7.8 to 7.9. If I delete those content in field_config table, would the site be affected since I only need to disable the modules for update and will turn them back on?
The documentation is not that easy to understand and follow. Any clearer advices or work around for this issue? Much appreciate!
Comment #19
drupal a11y CreditAttribution: drupal a11y commented@flexicode #8: You can use the gallery on the latest 1.x or 2.x dev if you remove the depency set in the media gallery .info file.
Comment #20
azabeti CreditAttribution: azabeti commentedThanks drikc, deleting the associated record with 'media' in the module field in the field_config table allowed me to uninstall the modules.
Comment #21
rojesaga CreditAttribution: rojesaga commentedIt Work for me, trying to delete fields that no logner been used in any content type, profile or taxomony but still claim that were in use. THANKS A LOT.
Comment #21.0
rojesaga CreditAttribution: rojesaga commentedTurn the in-line link into a nicer 'a' tag
Comment #22
drikc CreditAttribution: drikc commentedComment #23
drikc CreditAttribution: drikc commentedComment #24
drikc CreditAttribution: drikc commentedComment #25
thomasaaron CreditAttribution: thomasaaron commentedThanks. Running Cron worked for me.