This is a request for more information outside of what was given here: User roles and keeping their IDs when using features
Basically, it's the age-old problem of storing Roles in Features, and then migrating or importing them into a new site.
Based on some observations of mine when putting roles into a feature failed, it seems like Drupal takes the Role Feature and imports the stored roles in alphabetical order.
For example, I have some roles on my site that I stored into a feature. They had been originally created and added to my development site in this order:
- administrator
- moderator
- subscriber
- training
- announcer
- blogger
- manager
However, when I migrated the Features code to a new version of the site on a fresh database install, Drupal took the roles Feature I created, and imported the roles it contained in the following order:
- administrator RID -> 3
- announcer RID -> 4
- blogger RID -> 5
- manager RID -> 6
- moderator RID -> 7
- subscriber RID -> 8
- training RID -> 9
Is this normal behavior? And, if I just organize my roles into Features in alphabetical order, can I expect them to always be reimported in the same proper RID heirarchy?