- last update
over 1 year ago Build Successful - Open on Drupal.org →Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7last update
over 1 year ago Waiting for branch to pass
This error is thrown when I'm trying to clone a paragraph using Clone option from contextual links.
The website encountered an unexpected error. Please try again later.
AssertionError: Cannot load the "node" entity with NULL ID. in assert() (line 244 of core/lib/Drupal/Core/Entity/EntityStorageBase.php).
assert(, 'Cannot load the "node" entity with NULL ID.') (Line: 244)
After investigating the error cause I found that when the user opens media modal form, paragraphs edit clone form is rebuilt using media context and current form context containing data for cloning is lost.
- clone a paragraph entity with a media field
- fill all information required for cloning
- upload an image via media library
- saving the form will throw the error
Since FormState values are lost, I propose the solution to retrieve lost data from UserInput state, this will allow ParagraphCloneForm to finish cloning process.
Needs review
2.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.