Hi,

I have exported some og roles in a feature called "operations". Then I exported some og permissions for my operations content type in a feature called "contacts".

Every time I export these permissions, features does not "find out" that the og roles for those permissions are already exported in the "operations" feature, causing the "contacts" feature to always be in conflict with the "operations" feature.

I will provide a patch to fix this issue.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

guillaumev’s picture

Here is the patch

guillaumev’s picture

Status: Active » Needs review
shushu’s picture

@guillaumev, thanks for the patch.
Which Features version do you use ?

guillaumev’s picture

@shushu I'm using 7.x-2.0

shushu’s picture

Status: Needs review » Postponed (maintainer needs more info)

I tried to reproduce the problem and failed.
What I did was:
1. Creating a group content type with permissions field in it.
2. Creating an OG role and set some permissions to it.
3. Create a feature with the OG role.
4. Create a feature with OG permissions.

As far as I understood, after trying to enable those two features I should have seen some conflicts.
Since I did not, I can't tell whether your patch works or not.
Please advise how to reproduce the problem.

guillaumev’s picture

Status: Postponed (maintainer needs more info) » Needs review

@shushu You should not expect to see conflicts. What you should see if you try to reexport the feature with OG permissions is that this feature will also export the role contained in the feature with the OG role, instead of simply adding the feature with the OG role as a dependency...

Let me know if you need more details.

shushu’s picture

Status: Needs review » Reviewed & tested by the community
guillaumev’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
1.32 KB

My patch was missing something: if a role was part of feature x, it would try to add feature x as a dependency instead of adding the actual roles. This new patch fixes the issue.

sgabe’s picture

I can confirm that the patch in #8 fixes the issue.

shushu’s picture

Can you provide an interdiff please ?

jviitamaki’s picture

Here's the interdiff also bump

Status: Needs review » Needs work

The last submitted patch, 11: 2195269-og_features_role-1-8.patch, failed testing.

jviitamaki’s picture

jviitamaki’s picture

Status: Needs work » Needs review
FileSize
509 bytes

Sorry for retardation... Heres correctly named interdiff.

paranojik’s picture

Status: Needs review » Reviewed & tested by the community

I can confirm patch from #8 fixes the issue.

ndobromirov’s picture

Priority: Normal » Major

Hi, RTBC +1! I've also tested and confirm that this patch fixes the exact problem with multiple exports of group roles in different features.
This was tested against the current stable 2.9.

Bump to major, as this is causing feature conflicts, effectively preventing granular use of features.

Thanks for the patch!!!

shelane’s picture

Patch on #8 worked for me as well. +1 on RTBC

ajayg’s picture

What is preventing getting this committed as it has been RTBC for a while?

Chris Burge’s picture

I can confirm patch #8 resolves this issue. +1 for committing