- Issue created by @nicolas bouteille
- Status changed to Closed: works as designed
over 1 year ago 1:20pm 14 September 2023 - 🇫🇷France nicolas bouteille
It seems the problem was coming from my own custom wrapper function
public function preserveChanged() { if ( property_exists($this->entity, 'changed')) { $this->entity->changed->preserve = TRUE; } }
the property_exists was returning false all the time...
this code works best:public function preserveChanged() { if ($this->entity instanceof FieldableEntityInterface && $this->entity->hasField('changed')) { $this->entity->get('changed')->preserve = TRUE; } }