diff --git a/core/modules/node/src/Form/NodeDeleteForm.php b/core/modules/node/src/Form/NodeDeleteForm.php index b02b4c62f9a154c12b1945794b8229e3ce2effd4..7a455cdddbbeedb0130b7936e05723dea4bbd4b3 100644 --- a/core/modules/node/src/Form/NodeDeleteForm.php +++ b/core/modules/node/src/Form/NodeDeleteForm.php @@ -19,18 +19,18 @@ protected function getDeletionMessage() { $entity = $this->getEntity(); $node_type_storage = $this->entityTypeManager->getStorage('node_type'); - $node_type = $node_type_storage->load($entity->bundle())->label(); + $node_type = $node_type_storage->load($entity->bundle()); if (!$entity->isDefaultTranslation()) { return $this->t('@language translation of the @type %label has been deleted.', [ '@language' => $entity->language()->getName(), - '@type' => $node_type, + '@type' => $node_type->label(), '%label' => $entity->label(), ]); } return $this->t('The @type %title has been deleted.', [ - '@type' => $node_type, + '@type' => $node_type->label(), '%title' => $this->getEntity()->label(), ]); }