Related to the work done in #1840236: hook_feature_revert() incorrect?.

I have created a features module drupal7_metatag with some metatag configs

When I revert the feature with metatag configs with drush fr --force drupal7_metatag I am getting the following error

PHP Fatal error:  Call to undefined function drupal7_metatag_metatag_export_default() in /private/var/www/drupal7/docroot/sites/all/modules/metatag/ on line 55

The issue is is not being loaded before the function drupal7_metatag_metatag_export_default() is called in metatag_feature_revert(). I have confirmed that by adding a include_once ''; in the drupal7_metatag.module solves the problem. With a lot of help from q0rban and juampy, we noticed that features_include_defaults() is not getting loaded to include all the necessary inc files. Looking through the implementation of features.taxonomy, features.user, etc, it seems like the standard way to implement a hook_features_revert() is to call features_get_default('{module}', $module). Patch to follow.

#1 metatag-features-revert-1866980.patch1.72 KBmakangus
PASSED: [[SimpleTest]]: [MySQL] 11 pass(es). View
Members fund testing for the Drupal project. Drupal Association Learn more


makangus’s picture

Status: Active » Needs review
1.72 KB
PASSED: [[SimpleTest]]: [MySQL] 11 pass(es). View
DamienMcKenna’s picture

Status: Needs review » Fixed

@makangus: Good catch, thanks! Committed!

Status: Fixed » Closed (fixed)

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