I've created a simple override of a context which has one deletion and one addition. I decided that I don't want the addition so I deleted it from code in the *.features_override.inc file. I cleared the cache and expected the feature I was overriding to show that the context was overridden. However I see that the context is shown as default and that my overrides module is now overridden, adding back in the addition I deleted from code.

The primary benefit I see for features_override is for providing a UI to calls such as hook_context_default_contexts_alter() and other _alter() hooks which can take some time to craft. But if I can't update the code in an overrides module I'd rather go back to crafting these alter hooks and knowing I can always update them without ever touching the db.

Comments

nedjo’s picture

Title: Why are overrides stored in DB? » How to get a change made to an exported override to show up?

Like any time you've made an edit in code to a features compontent and want your change to show up, you need to revert any overrides--in this case, the feature override you created. That should get you what you're wanting.

In general when creating features, the following is a good workflow:

  • Create the item, e.g., a context, features override, etc.
  • Add the item to a feature.
  • Enable the feature on the site.
  • Immediately revert the component (or, if you're sure you don't have other changes elsewhere, the whole feature).

Then for each subsequent change:

  • Edit the item.
  • Update the feature.
  • Immediately revert the component (or, if you're sure you don't have other changes elsewhere, the whole feature).

That keeps your features clean and in their default state.