I ran into an issue where content exported from one environment was imported onto another one, but was created in the wrong order. this causes the feature to always show overridden. This basically stems from the following code:
function content_features_export_render($module_name, $data, $export = NULL) {
$code = "\$content = array();\n";
foreach($data as $name) {
...
if you just take $data, there's no guarantee that they are in the same order as the original render order. this essentially means that the feature will only work right on the env it was created on. adding an asort() in will at least guaranteed that the sort order is correct each time.
function content_features_export_render($module_name, $data, $export = NULL) {
$code = "\$content = array();\n";
asort($data);
foreach($data as $name) {
note that doing this will cause you to have to rebuild the feature since the content will now have a new fixed order.
hope this helps.
Comments
Comment #1
luisortizramos commentedI've rewritten the patch usign the drupal version control documentation. This way I can use it in a makefile.
Comment #2
Anonymous (not verified) commentedComment #3
pcho commentedThanks netw3rker! I applied your recommendation to both versions.