diff --git a/core/modules/path/src/Plugin/Field/FieldType/PathItem.php b/core/modules/path/src/Plugin/Field/FieldType/PathItem.php index 0c98544..4effaa0 100644 --- a/core/modules/path/src/Plugin/Field/FieldType/PathItem.php +++ b/core/modules/path/src/Plugin/Field/FieldType/PathItem.php @@ -117,9 +117,10 @@ public static function mainPropertyName() { * Ensures the alias properties are loaded if available. */ protected function ensureLoaded() { - if (!$this->isLoaded) { + $entity = $this->getEntity(); + if (!$this->isLoaded && !$entity->isNew()) { $alias = \Drupal::service('path.alias_storage')->load([ - 'source' => '/' . $this->getEntity()->toUrl()->getInternalPath(), + 'source' => '/' . $entity->toUrl()->getInternalPath(), 'langcode' => $this->getLangcode(), ]); if ($alias) {