The "node" entity cannot have a URI as it does not have an ID

Created on 25 May 2023, almost 2 years ago
Updated 1 March 2024, about 1 year ago

Problem/Motivation

JsonLdHeadFormatter causes fatal error when using Preview of the unsaved node.

Drupal\Core\Entity\EntityMalformedException: The "node" entity cannot have a URI as it does not have an ID in Drupal\Core\Entity\EntityBase->toUrl() (line 161 of /var/www/html/web/core/lib/Drupal/Core/Entity/EntityBase.php).

Proposed resolution

Skip adding attachments if $entity->isNew()

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇺🇦Ukraine Anna D

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024