This is a follow up to the Features issue #904558: Multiple features and strongarm conflicts - sometimes variables are exported twice causing conflicts between multiple features. Eg. when a distribution feature relies on node type in a kit feature Strongarm might export the variables for that node as part of both features - which causes conflicts.

I'm attaching a patch that I think fixes this.

CommentFileSizeAuthor
strongarm_features_conflicts.patch1023 bytesvoxpelli
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Grayside’s picture

Status: Needs review » Needs work

Making a module defining a content type depend on modules defining variables for that content type doesn't make sense. I would view the variables as being settings that enhance the content type with non-default behaviors.

From that perspective, if the variables have already been exported, they should simply be ignored by the current feature. This allows the developer to piece together whatever module hierarchy he wants, without having Strongarm try to dictate behavior.

bleen’s picture

Status: Needs work » Reviewed & tested by the community

Grayside ... I think this problem occurs not as much because a user is explicitly "making a module defining a content type depend on modules defining variables for that content type" but more because of the auto-detection that happens in features.

In the origin post at #904558: Multiple features and strongarm conflicts you'll see that the example given has one feature (A) which includes content type X and another (B) which includes a context that uses content type X as one of its conditions. There is nothing inherently wrong with this setup (I imagine that Feature B should depend on Feature A in this case, but never-the-less its a legitimate use case.)

The issue is that in this case features is auto-detecting the variables that content type X depends on in both features. The user is not explicitly choosing these vars when building his/her feature.

I am having the identical problem on my current site and this patch combined with the patch at #904558: Multiple features and strongarm conflicts seems to fix the issue

tim.plunkett’s picture

This works for me, used the same method for #881170-18: Add Features support to Automatic Nodetitles.

hefox’s picture

Status: Reviewed & tested by the community » Postponed

#904558 is one that fixes it in features; let's see where that ticket goes before changing strongarm?