2

I've lost far, far too many weeks and weekends fighting with Drupal and the Features module in the last year, and I still can't find consistently reliable approach to debugging failed feature reverts.

Now I'm sure I can't be the only person having this problem, because I've watched enough other developers on projects I work on tearing their hair out too, so I'm asking this question, in the hope of saving pain in future.

What steps should you take when troubleshooting a non-reverting feature with Drupal 6?

It's safe to assume knowledge of drush, to run diffs of features, and watchdog, and the --debug and --verbose when answering.

1

3 Answers 3

1

Do you have any modules implementing hook_strongarm_alter()?

If you're blindly overriding Drupal system variables using hook_strongarm_alter() as follows:

function mysite_strongarm_alter(&$items) {
  $items['upload_extensions_default']->value .= ' qtz';
}

...some Features may incorrectly appear as Overridden.

Instead check to see whether the item is defined first:

function mysite_strongarm_alter(&$items) {
  if($items['upload_extensions_default']) {
    $items['upload_extensions_default']->value .= ' qtz';
  }
}

...and the Strongarm aspect of the Feature will no longer incorrectly appear as Overridden.

0

If you have Page Manager panels, those may have to be reverted separately. In many cases I've had to do things like, first revert the feature, then revert the variant or page, and then revert the feature again.

0

The main thing to understand is how features are generated. They always read configuration to be generated from .info file.

Since this question is from 2011, I can say that Features are far more stable now and working for the last 3 years closely with features almost never had an issue with stuck features.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.