Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#14 | interdiff-2195269-og_features_role-1-8.txt | 509 bytes | jviitamaki |
#8 | 2195269-og_features_role-8.patch | 1.32 KB | guillaumev |
#1 | 2195269-og_features_role-1.patch | 1.29 KB | guillaumev |
Comments
Comment #1
guillaumev CreditAttribution: guillaumev commentedHere is the patch
Comment #2
guillaumev CreditAttribution: guillaumev commentedComment #3
shushu CreditAttribution: shushu commented@guillaumev, thanks for the patch.
Which Features version do you use ?
Comment #4
guillaumev CreditAttribution: guillaumev commented@shushu I'm using 7.x-2.0
Comment #5
shushu CreditAttribution: shushu commentedI 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.
Comment #6
guillaumev CreditAttribution: guillaumev commented@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.
Comment #7
shushu CreditAttribution: shushu commentedComment #8
guillaumev CreditAttribution: guillaumev commentedMy 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.
Comment #9
sgabe CreditAttribution: sgabe commentedI can confirm that the patch in #8 fixes the issue.
Comment #10
shushu CreditAttribution: shushu commentedCan you provide an interdiff please ?
Comment #11
jviitamaki CreditAttribution: jviitamaki at KWD Digital commentedHere's the interdiff also bump
Comment #13
jviitamaki CreditAttribution: jviitamaki at KWD Digital commentedComment #14
jviitamaki CreditAttribution: jviitamaki at KWD Digital commentedSorry for retardation... Heres correctly named interdiff.
Comment #15
paranojik CreditAttribution: paranojik commentedI can confirm patch from #8 fixes the issue.
Comment #16
ndobromirov CreditAttribution: ndobromirov at FFW commentedHi, 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!!!
Comment #17
shelanePatch on #8 worked for me as well. +1 on RTBC
Comment #18
ajayg CreditAttribution: ajayg as a volunteer commentedWhat is preventing getting this committed as it has been RTBC for a while?
Comment #19
Chris Burge CreditAttribution: Chris Burge commentedI can confirm patch #8 resolves this issue. +1 for committing