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.
Issue fork mercury_editor-3554039
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
Comment #3
johntarling commentedI've created a merge request which just adds a null check on the layout before it tries to delete it from the tempstore.
Comment #5
justin2pin commentedThanks John! Merged and marked as fixed.