When writing to datastore in one site, the order of the keys in the array can change which create fake "Overridden" elements.
--- a/sites/datastore/backends/field.node.body.public_page.inc
+++ b/sites/datastore/backends/field.node.body.public_page.inc
@@ -113,11 +113,11 @@ $data = array(
),
'required' => FALSE,
'description' => '',
- 'default_value' => NULL,
'field_name' => 'body',
'entity_type' => 'node',
'bundle' => 'public_page',
'deleted' => '0',
+ 'default_value' => NULL,
),
);
The solution is to add ksort when exporting.
I used this method in other places as well to have full consistency.
-------
Bernard Szlachta
http://www.nobleprog.co.uk/drupal/training
http://www.nobleprog.us/drupal-training-courses
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | sort_exports-1958464-3.patch | 1.17 KB | rylowry@gmail.com |
| #2 | fielddiff.png | 83.79 KB | rylowry@gmail.com |
| #2 | tabediff.png | 40.72 KB | rylowry@gmail.com |
| configuration.patch.txt | 421 bytes | bnobleman |
Comments
Comment #1
ar-jan commentedI have the same thing happening with permissions - the order of roles is different. This actually happened on just one site: start tracking, revisit the tracking tab, and one of the permissions being tracked is shown as overridden.
Comment #2
rylowry@gmail.com commentedI'm also having this problem. When I was learning about this module, I followed a video (http://sydney2013.drupal.org/configuration-management-drupal-7), which if I recall correctly, describes the usefulness of being able to check your .inc files into revision control, and deploy them elsewhere by doing a pull, and then syncing them to the active store. Here is how things have been going for me:
It seems to me that in an ideal world, you would pull, sync new configs to the active store, start tracking, and if everything went successfully, the .inc file *would not change*.
In the case I describe above, my import is basically successful. All the meaningful configurations are inserted into the database, and the site works fine. But since there are changes to the .inc file, there is a chance future pulls will fail. What if there is a conflicting change? Just to further illustrate the problem, here are some diffs showing changes that occur to the .inc files.
Some fields being juggled around:

Foreign key table mysteriously moves:

Comment #3
rylowry@gmail.com commentedHere's a little patch that does a ksort in StoragePhp::export(), and a sort in PermissionConfiguration::prepareBuild(). The ksort prevents reordering in the optional and dependency lists, and the sort in PermissionConfiguration keeps roles in the same order inside exported permissions.
Comment #4
chi commentedComment #5
chi commentedWorks for me
Comment #6
bnobleman commentedworks for me as well
Comment #6.0
bnobleman commentedadded signature
Comment #7
dagmar3: sort_exports-1958464-3.patch queued for re-testing.
Comment #8
dagmarCommitted and Pushed to 7.x-2.x. Thanks!