Problem/Motivation

Occasionally when exiting editing, the following PHP error occurs.

Uncaught PHP Exception TypeError: "Drupal\layout_paragraphs\LayoutParagraphsLayoutTempstoreRepository::delete(): Argument #1 ($layout_paragraphs_layout) must be of type Drupal\layout_paragraphs\LayoutParagraphsLayout, null given, called in /modules/contrib/mercury_editor/src/Controller/MercuryEditorController.php on line 201" at /modules/contrib/layout_paragraphs/src/LayoutParagraphsLayoutTempstoreRepository.php line 73

Steps to reproduce

I can't consistently trigger this. but it is sometimes as easy as adding a few paragraphs, saving and then exiting editing.

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

johntarling created an issue. See original summary.

johntarling’s picture

Status: Active » Needs review

I've created a merge request which just adds a null check on the layout before it tries to delete it from the tempstore.

justin2pin made their first commit to this issue’s fork.

justin2pin’s picture

Version: 3.0.0-alpha7 » 3.0.x-dev
Status: Needs review » Fixed

Thanks John! Merged and marked as fixed.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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