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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gildir’s picture

First attempt at a patch to do this.

gildir’s picture

Status: Active » Needs review
salvis’s picture

Status: Needs review » Needs work

Without 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.

shelane’s picture

Status: Needs work » Reviewed & tested by the community
FileSize
1012 bytes

I 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.

mlima’s picture

Has the latest patch been merged?

shelane’s picture

It 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.

shelane’s picture

I have updated the patch to role it against the current dev.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 7: roleassign-feature-export-2189541.patch, failed testing. View results

shelane’s picture

Status: Needs work » Reviewed & tested by the community
FileSize
1.02 KB

Fixed patch path.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 9: roleassign-feature-export-2189541.patch, failed testing. View results