AssertionError: Cannot load the "node" entity with NULL ID
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3560203. --> Reported by: [norman.lol](https://www.drupal.org/user/2482808) Related to !146 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>I had this in both v1 and v2:</p> <p>As soon as I click the plus icon to add a paragraph in the frontend I get this error:</p> <blockquote><p>AssertionError: Cannot load the "node" entity with NULL ID. in assert() (line 262 of core/lib/Drupal/Core/Entity/EntityStorageBase.php).<br> Drupal\Core\Entity\EntityStorageBase-&gt;load() (Line: 148)<br> Drupal\frontend_editing\FieldReferenceHelper-&gt;accessAdd() (Line: 217)<br> Drupal\frontend_editing\Controller\FrontendEditingController-&gt;accessAdd()<br> call_user_func_array() (Line: 66)<br> Drupal\Core\Access\CustomAccessCheck-&gt;access()<br> call_user_func_array() (Line: 160)<br> Drupal\Core\Access\AccessManager-&gt;performCheck() (Line: 136)<br> Drupal\Core\Access\AccessManager-&gt;check() (Line: 113)<br> Drupal\Core\Access\AccessManager-&gt;checkRequest() (Line: 106)<br> Drupal\Core\Routing\AccessAwareRouter-&gt;checkAccess() (Line: 91)<br> Drupal\Core\Routing\AccessAwareRouter-&gt;matchRequest() (Line: 990)<br> Drupal\easy_breadcrumb\EasyBreadcrumbBuilder-&gt;getRequestForPath() (Line: 510)<br> Drupal\easy_breadcrumb\EasyBreadcrumbBuilder-&gt;build() (Line: 85)<br> Drupal\Core\Breadcrumb\BreadcrumbManager-&gt;build() (Line: 363)<br> Drupal\gin\GinNavigation-&gt;getNavigationActiveTrail() (Line: 87)<br> gin_toolbar_preprocess_html() (Line: 369)<br> Drupal\Core\Extension\ModuleHandler-&gt;invoke() (Line: 304)<br> Drupal\Core\Theme\ThemeManager-&gt;render() (Line: 497)<br> Drupal\Core\Render\Renderer-&gt;doRender() (Line: 227)<br> Drupal\Core\Render\Renderer-&gt;render() (Line: 162)<br> Drupal\Core\Render\MainContent\HtmlRenderer-&gt;Drupal\Core\Render\MainContent\{closure}() (Line: 627)<br> Drupal\Core\Render\Renderer-&gt;executeInRenderContext() (Line: 157)<br> Drupal\Core\Render\MainContent\HtmlRenderer-&gt;renderResponse() (Line: 90)<br> Drupal\Core\EventSubscriber\MainContentViewSubscriber-&gt;onViewRenderArray() (Line: 246)<br> Symfony\Component\EventDispatcher\EventDispatcher::Symfony\Component\EventDispatcher\{closure}() (Line: 206)<br> Symfony\Component\EventDispatcher\EventDispatcher-&gt;callListeners() (Line: 56)<br> Symfony\Component\EventDispatcher\EventDispatcher-&gt;dispatch() (Line: 188)<br> Symfony\Component\HttpKernel\HttpKernel-&gt;handleRaw() (Line: 76)<br> Symfony\Component\HttpKernel\HttpKernel-&gt;handle() (Line: 53)<br> Drupal\Core\StackMiddleware\Session-&gt;handle() (Line: 48)<br> Drupal\Core\StackMiddleware\KernelPreHandle-&gt;handle() (Line: 28)<br> Drupal\Core\StackMiddleware\ContentLength-&gt;handle() (Line: 116)<br> Drupal\page_cache\StackMiddleware\PageCache-&gt;pass() (Line: 90)<br> Drupal\page_cache\StackMiddleware\PageCache-&gt;handle() (Line: 48)<br> Drupal\Core\StackMiddleware\ReverseProxyMiddleware-&gt;handle() (Line: 51)<br> Drupal\Core\StackMiddleware\NegotiationMiddleware-&gt;handle() (Line: 53)<br> Drupal\Core\StackMiddleware\AjaxPageState-&gt;handle() (Line: 51)<br> Drupal\Core\StackMiddleware\StackedHttpKernel-&gt;handle() (Line: 715)<br> Drupal\Core\DrupalKernel-&gt;handle() (Line: 19)</p></blockquote> <h4 id="summary-steps-reproduce">Steps to reproduce</h4> <p>Vanilla Drupal 11, few paragraph types, add action enabled, dummy content generated, click plus icon: &#9760;&#65039;</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>As soon as I remove the NULL defaults from the add routes, the error is gone and everything works as expected.</p> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <h3 id="summary-ui-changes">User interface changes</h3> <h3 id="summary-api-changes">API changes</h3> <h3 id="summary-data-model-changes">Data model changes</h3>
issue