Content creation fails when 'Create referenced entities if they don't already exist' is enabled on Paragraph field

Created on 21 May 2025, 16 days ago

Problem/Motivation

While working with the Paragraphs module, I encountered an error when configuring a Paragraph field to reference Content (Node) instead of Paragraph types.

The issue occurs specifically when enabling the "Create referenced entities if they don't already exist" option. When trying to create a piece of content using this setup, the form fails to submit, and an error is logged in Recent log messages (/admin/reports/dblog). No content is saved.

A screen recording is attached for reference.

Steps to reproduce

Go to Structure > Content types, and edit any existing content type (e.g., Article).

Add a new field of type Paragraph.

In the field settings, under "Type of item to reference", change the target type from Paragraph to Content (Node).

Choose one or more content types to reference (e.g., Article).

Check the option "Create referenced entities if they don't already exist."

Save the field settings and the content type.

Go to Content > Add content, and try creating a node of that content type.

Fill in the required fields and attempt to save the content.

Expected behavior

Content should be created successfully.

Referenced content entities (nodes) should be auto-created if they don't already exist.

Actual behavior

An error is thrown during form submission.

The node is not saved.

An error message is logged in the system log (/admin/reports/dblog).

Additional information

Screen recording attached showing the full reproduction steps and the resulting error.

🐛 Bug report
Status

Active

Version

1.9

Component

Experimental Widget

Created by

🇮🇳India lavanyatalwar

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

Comments & Activities

Production build 0.71.5 2024