6

I'v got a question regarding dependencies & configuration. I created a module providing a content type, field type, widget & formatter.

  • While wanting to uninstall the module, I get the following message:

    The following reason prevents module from being uninstalled:

    • Fields type(s) in use
  • So I go to structure, try to delete the content type & get the following:

    module's content type is used by x pieces of content on your site. You may not remove module's content type until you have removed all of the module's content type content.

  • I go delete all my nodes first as it seems this needs to be done first. I retry uninstalling the module & get message:

    Fields pending deletion

  • I run cron & am now able to uninstall my module with message:

    The following modules will be completely uninstalled from your site, and all data from these modules will be lost!

I can see that dependencies are met well, but this gives it a long run before one can uninstall a module. Is there a way I can keep dependency integrity while once I am willing to uninstall the module to automatically remove configuration & content from start till end dependency?

4

You can, if you write the code for doing that yourself. Core currently doesn't offer a way to do that automatically.

See Impossible to uninstall Flag and the linked issue for Simplenews for inspiration.

  • Thanks for the reference Berdir! That's what I was looking for – baikho Dec 22 '15 at 12:41
3

Google sent me to this page when I was searching for uninstall module drupal 8 "Fields pending deletion". I was unable to uninstall Feeds module with the message Fields pending deletion.

The solution was to run the cron several times.

See this.

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.