| Project: | Metatag |
| Version: | 7.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
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/metatag.features.inc on line 55The issue is drupal7_metatag.features.metatag.inc 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 'drupal7_metatag.features.metatag.inc'; 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.
Comments
#1
#2
@makangus: Good catch, thanks! Committed!
#3
Automatically closed -- issue fixed for 2 weeks with no activity.