Error Drupal\Core\Entity\EntityStorageException: Update existing 'paragraph' entity while changing the ID is not supported, while creating a node

Created on 22 April 2024, 8 months ago
Updated 23 April 2024, 8 months ago

Problem/Motivation

Getting error: Drupal\Core\Entity\EntityStorageException: Update existing 'paragraph' entity while changing the ID is not supported. in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 817 of C:\Users\osinghrajput\Documents\Repositories\dh8\site\web\core\lib\Drupal\Core\Entity\Sql\SqlContentEntityStorage.php).

We have a paragraph attached to a node, while creating a new page the node saves an empty paragraph, inorder to remove the empty paragraph, we have written below code:
if (empty($paragraph) {
$paragraph->delete();
}

Using below versions:
Drupal: 10.2.4
Paragraph: 1.17.0
PHP: 8.1
entity_reference_revisions : 8.x-1.11

this issue is with module entity_reference_revisions with version 1.11.0

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

💬 Support request
Status

Active

Version

1.11

Component
Other 

Last updated 2 days ago

Created by

🇮🇳India omsingh89

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

Comments & Activities

Production build 0.71.5 2024