Problem
When reverting hierarchical select features manually, everything works as it should. However, if you try to revert HS features using an update hook, the features are not reverted.
Cause
Currently in hierarchical_select_features_rebuild() we're using module_invoke() to load default config for the component in the module. This works for manual reverts, since all the include files are already loaded by default. But when running update hooks, the 'hierarchical_select_default_configs()' is not invoked, since the include file is not present.
Solution
Features provides a features_get_default() -function to get the default configuration to the given component / module pair. This automatically includes the needed files and resets the static caches as a nice bonus. I've attached a patch to fix that.
Comment | File | Size | Author |
---|---|---|---|
hierarchical_select-feature_revert_update.patch | 1004 bytes | afox | |
Comments
Comment #1
stefan.r CreditAttribution: stefan.r commented