As a follow up to my patch port here: http://drupal.org/node/1611848 i noticed that in some cases I was still having issues where features were considered "Overriden" after loading them on a different server.

Doing a diff of a feature generated on the "overridden" server versus on my original server reveals that revision_uid and various file field timestamp fields were different. For revision_uid, it obviously makes sense that they would differ, but if I've enabled "Reset value on import' with revision author, then revision_uid should be somehow ignored when doing the feature detection.

Similarly, as part of the patch port - even though created/updated timestamps are cleaned up, it seems like all general timestamps should be cleaned up - these are highly volatile data fields, after all.

I would like to help out more directly, but I'm honestly brand-spanking-new to the Features API. If someone could at least point to me the feasibility of this or where to start looking, I'd be happy to spend some bandwidth producing a patch.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

thelee’s picture

Alright, here's a patch with some fixes. It's not complete; there are still some features that still show as Overridden on our servers, but at this point I think it's a fundamental PHP problem or Drupal problem - whatever it is, it's outside the scope of node_export.

Patch should be self-explanatory. Long story short are these bullet points
- consistent representation by sorting the keys of the node object (we had cases where fields on one server came out in a different order than another)
- handling for revision_uid better (now follows behavior of node->uid and also checks for error case where revision_uid is 0)
- checks for invalid seralization in node->data (NULL mismatch with "b:0;" (boolean FALSE which casts to NULL but is not === to NULL)

increases the accuracy of the "overridden" label on our node_export features to like 70%, way better than the 20% or so before. Also see patch port in first comment.

thelee’s picture

Version: 7.x-3.0 » 7.x-3.x-dev
thelee’s picture

Status: Active » Needs review
ergophobe’s picture

This plus the patch in #1611848: Do a better job cleaning nodes when exporting via features. Helps avoid features thinking a node is constantly 'Overridden'. fixes this for me. Thanks thelee!

It would be great to see these two patches committed. The constant "overridden" has been bugging me for a while.

tobiasb’s picture

Issue summary: View changes
FileSize
1.15 KB

* no changes, just converted the file to utf8 and unix ln

  • danielb committed f2e4169 on 7.x-3.x authored by tobiasb
    Issue #1826266 by thelee, tobiasb: Features shouldn'\''t check certain...
danielb’s picture

Status: Needs review » Closed (fixed)