When i import via paste code using json data exported from VBO; the new nodes do get the proper created dates; but all nodes have changed date reset to current date.

Yes, the "Changed time (Last updated date/time) " setting for this node type is not set to be reset.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

liquidcms created an issue. See original summary.

anmolgoyal74’s picture

Status: Active » Needs review
FileSize
37.57 KB

I tested this case, everything is working as required.
If the "Changed time (Last updated date/time) " setting for node type is not set to be reset, the last updated time is same as in the node.
See the screenshot attached.

If you are still facing the issue, Please describe the steps to reproduce the error.

gaurav.kapoor’s picture

Status: Needs review » Closed (outdated)
Ronino’s picture

Title: imported data has changed date reset to current » Imported data has "changed" timestamp reset to current though configured otherwise
Version: 7.x-3.1 » 7.x-3.x-dev
Status: Closed (outdated) » Needs review
FileSize
609 bytes

I think this occurs if there are dependencies to be handled like field collection items in my case.

There are multiple occurrences of where node_save() instead of the custom version node_export_save() is used, leading to the "changed" timestamp being reset when the node is saved again after dependencies have been handled.

My patch fixes this in node_export_dependency_node_export_after_import_alter() and all changed timestamps are kept for me now. I didn't change the other occurrences of node_save() though as I couldn't test that code.

DamienMcKenna’s picture

Status: Needs review » Reviewed & tested by the community

This seems appropriate.