Problem/Motivation
Sometimes, the original entity is not available in entity update hooks. This is because in EntityStorageBase::doPostSave, unset($entity->original); is called.
Steps to reproduce
I haven't been able to reproduce this consistently, but it has happened more than once already on a production website.
Proposed resolution
Make the getter nullable, just like EntityPresaveEvent::getOriginalEntity is nullable.
Issue fork hook_event_dispatcher-3198524
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
dieterholvoet commentedComment #4
dieterholvoet commentedAny chance this can get merged? We keep hitting this problem on different projects, requiring us to add patches.
Comment #5
dieterholvoet commentedComment #6
el7cosmosComment #11
el7cosmosreleased in 3.3.0