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.
Exporting to features for deployment at another location (using strongarm) doesn't work if the role ids have changed between the two environments (and roles are exported by name). Storing the variable roleassign_roles as names rather than ids fixes this issue. Patch in one minute.
Comment | File | Size | Author |
---|---|---|---|
#9 | roleassign-feature-export-2189541.patch | 1.02 KB | shelane |
#4 | roleassign-feature-export-hook-update-2189541.patch | 1012 bytes | shelane |
| |||
#1 | roleassign-features-export-2189541-1.patch | 1.01 KB | gildir |
Comments
Comment #1
gildir CreditAttribution: gildir commentedFirst attempt at a patch to do this.
Comment #2
gildir CreditAttribution: gildir commentedComment #3
salvisWithout having looked at this in detail, it's clear that we'd need to have a hook_update_NNN() function to convert the existing variable value.
Comment #4
shelaneI recently went through the same exercise on a module of mine - converting from rid to role name for strongarm export. So I have attached a patch for the hook_update to convert for existing sites using roleassign. I have test both patches on an existing site without issue. The roleassign module works as expected with these patches.
Comment #5
mlima CreditAttribution: mlima commentedHas the latest patch been merged?
Comment #6
shelaneIt has not been merged and I just discovered that our code base was updated with version 1.2 but the patch was not reapplied. Apparently we've gone a long time without this feature working for our users because the settings weren't in production with the feature revert.
Comment #7
shelaneI have updated the patch to role it against the current dev.
Comment #9
shelaneFixed patch path.