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.

CommentFileSizeAuthor
hierarchical_select-feature_revert_update.patch1004 bytesafox
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

stefan.r’s picture

Issue summary: View changes
Status: Needs review » Fixed

  • stefan.r committed 6897f7d on 7.x-3.x authored by afox
    Issue #2017535 by afox: Feature reverting in update hooks broken
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.