0

I installed a module that left a ghost field that isn't tied to any entity bundle :(

How would I go about safely and thoroughly deleting this field from the database?

I have to delete this field to uninstall the module. I have attempted to run cron and clear cache to see if that would remove the field (it does not).

MYSQL command: show tables like '%<string in field>%'; only produces one result (the field I want to delete). Do I just drop that table?

I am using Drush 9.x, so unfortunately it looks like drush field-delete is not available. Is there a way to do this with Drush 9 or Drupal Console?

Thanks in advance for your help!

2

In Drupal 8 bundle fields are configuration. This looks like you still have the field storage configured.

In this case export configuration:

drush cex

remove the field storage:

rm field.storage.node.field_example.yml

and import configuration again:

drush cim
  • Many thanks! Worked like a charm! Very handy info to know. – ymdahi Jun 27 at 16:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.