I am attempting to create a feature to be used in an install profile that exports a vocabulary and the permissions that are associated with the vocabulary. The problem that I am running into is that the vocabulary vid's on my development site do not match the vid's when running an install profile. Features exports the vocabulary and when imported the next available index in the table is used to create the new vocabulary being imported by the feature. Term permissions use the vid, so when you export the permissions with a feature they look something like:
// Exported permission: edit terms in 4.
$permissions['edit terms in 4'] = array(
'name' => 'edit terms in 4',
'roles' => array(),
'module' => 'taxonomy',
);
When I run my install profile the vocabulary I exported is imported with vid 1. So when it attempts to add the permissions for vid 4 it throw an integrity constraint error. I could change the features permissions code to align the id's but this does not bode well when I need to release a new feature that uses vocabularies and their permissions on top of an existing site that already has some vocabularies associated with it. I wanted to check here first before submitting an issue with features. Does anyone know a trick on how to get vocabularies and their permissions exported properly with features?
I was originally using features 7.x-1.0-rc2 then attempted to rectify the issue with 7.x-1.0-rc3 as there are a number of threads with similar issues but not quite the same issue as I am having.