Fatal error when saving entity with empty data-entity-type or data-entity-uuid

Created on 20 February 2023, almost 2 years ago
Updated 21 February 2023, almost 2 years ago

Problem/Motivation

Fatal error when saving entity with tag containing empty data-entity-type or data-entity-uuid attributes.

Drupal\Core\Entity\EntityStorageException: The "" entity type does not exist. in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 815 of core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).

Steps to reproduce

Edit any node or block and paste <img data-entity-type="" data-entity-uuid="">. There will be a fatal error.
If entity body already containing tags with these attributes, entity can't be saved even if remove this tag from content.

Proposed resolution

Catch exceptions when try to proceed data-entity-uuid.

🐛 Bug report
Status

Closed: duplicate

Component

Miscellaneous

Created by

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

Comments & Activities

Production build 0.71.5 2024