By wim leers on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
11.1.x
Introduced in version:
11.1.0
Issue links:
Description:
- Before
-
$node = Node::load(1337); $changed_original = $node->getChangedTime(); $node->save(); $changed_current = $node->getChangedTime(); // $changed_current has a newer timestamp than $changed_original - After
- The above is still true.
- But if you indicate that the entity is syncing prior to saving it, then:
$node = Node::load(1337); $changed_original = $node->getChangedTime(); // If you indicate that you're updating an entity because you're *synchronizing* it // (migrating, importing from another site, … whichever reason you have!): $node->setSyncing(TRUE); // 👈 $node->save(); $changed_current = $node->getChangedTime(); // $changed_current STILL HAS THE SAME TIMESTAMP AS $changed_original 👈
Impacts:
Module developers