Problem/Motivation

The preview causes this error "Cannot load the "paragraph" entity with NULL ID"

Steps to reproduce

When we add a new node, that we add a paragraph, then go to preview mode.

Proposed resolution

Add a condition if the paragraph is null

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

marc le boulch created an issue. See original summary.

marc le boulch’s picture

Assigned: Unassigned » marc le boulch
Category: Bug report » Task

joao.ramos made their first commit to this issue’s fork.

joao.ramos.costa’s picture

This is particularly relevant when we try to create for a computed field as in the issue path, happening when, for example, the node create form is validated and a paragraph item is referenced without having been saved.

yivanov’s picture

Thank you for fixing this issue. Merging it into the 8.x-1.x

yivanov’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

yivanov’s picture

You are right @joao.ramos, better to use empty(). Will fix that, thanks!

yivanov’s picture

joao.ramos.costa’s picture

Thank you !