Problem/Motivation

The code in GroupContent::postDelete calls save() on the group content's corresponding entity, even if that entity has been deleted (see group_entity_delete()).

This can lead to odd behavior, such as this notice:

Notice: Trying to get property of non-object in /.../core/lib/Drupal/Core/Field/Plugin/Field/FieldType/PasswordItem.php line 49

Proposed resolution

Check if the entity has been deleted by re-loading from storage (which will return NULL for deleted entities).

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#2 3010896-02.patch903 bytesjhedstrom

Comments

jhedstrom created an issue. See original summary.

jhedstrom’s picture

Status: Active » Needs review
StatusFileSize
new903 bytes
jhedstrom’s picture

Issue summary: View changes
lobsterr’s picture

Status: Needs review » Closed (duplicate)