diff --git a/src/Entity/Controller/GroupListBuilder.php b/src/Entity/Controller/GroupListBuilder.php index fc81351..4600fc7 100644 --- a/src/Entity/Controller/GroupListBuilder.php +++ b/src/Entity/Controller/GroupListBuilder.php @@ -70,7 +70,14 @@ class GroupListBuilder extends EntityListBuilder { // need to add the render array using the 'data' key. $row['name']['data'] = $entity->toLink()->toRenderable(); $row['type'] = $entity->getGroupType()->label(); - $row['uid'] = $entity->uid->entity->label(); + // User can be deleted, and content can be assigned to Anonymous making the + // entity not have a correct label anymore. + if (isset($entity->uid->entity)) { + $row['uid'] = $entity->uid->entity->label(); + } + else { + $row['uid'] = $this->t('User does not exist or is deleted.'); + } return $row + parent::buildRow($entity); }