February 2015

Howto: Uninstall a field-based module.

Roman Zimmermann's picture
Roman Zimmermann

Usually when you try to uninstall a field-based module you're confronted with the following error message:

[module] is a required module and can't be disabled. Reason: Field type(s) in use - see Field list 

In this blogpost I'm showing you how to uninstall such a module anyway (deleting all the stored data).

D7: How not to use hook_entity_*

Roman Zimmermann's picture
Roman Zimmermann

Recently I came in a situation where I wanted to extend all entities of a specific type (payment) to reliably provide (and store) an additional property. At first glance this seems like a no brainer: simply use hook_entity_* to save/update/load the property to or from the database and that should do it. Turns out it isn't … and there is a lot to learn about how entities work in D7.

Lets take a look at a specific example.