I need to change a field in a node without altering the 'changed' timestamp. I know this was possible in Drupal 7 using field_attach_update()
, but that has been removed since then.
I could use an update query and change the field directly in the database, but I was wondering if there is a better way (or a replacement for field_attach_update()
).
changed
is a system field that reflects the last time that the node was saved. You might consider having a secondary field that you use to track the last time the node was updated "for real", as there isn't a way to bypass the changed field that I'm aware of. Can you provide the reason WHY you're wanting to do this? Are you trying to track the number of times a node was viewed? If so I would recommend tracking node views on something other than the node.