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->load() (Line: 148)<br>
Drupal\frontend_editing\FieldReferenceHelper->accessAdd() (Line: 217)<br>
Drupal\frontend_editing\Controller\FrontendEditingController->accessAdd()<br>
call_user_func_array() (Line: 66)<br>
Drupal\Core\Access\CustomAccessCheck->access()<br>
call_user_func_array() (Line: 160)<br>
Drupal\Core\Access\AccessManager->performCheck() (Line: 136)<br>
Drupal\Core\Access\AccessManager->check() (Line: 113)<br>
Drupal\Core\Access\AccessManager->checkRequest() (Line: 106)<br>
Drupal\Core\Routing\AccessAwareRouter->checkAccess() (Line: 91)<br>
Drupal\Core\Routing\AccessAwareRouter->matchRequest() (Line: 990)<br>
Drupal\easy_breadcrumb\EasyBreadcrumbBuilder->getRequestForPath() (Line: 510)<br>
Drupal\easy_breadcrumb\EasyBreadcrumbBuilder->build() (Line: 85)<br>
Drupal\Core\Breadcrumb\BreadcrumbManager->build() (Line: 363)<br>
Drupal\gin\GinNavigation->getNavigationActiveTrail() (Line: 87)<br>
gin_toolbar_preprocess_html() (Line: 369)<br>
Drupal\Core\Extension\ModuleHandler->invoke() (Line: 304)<br>
Drupal\Core\Theme\ThemeManager->render() (Line: 497)<br>
Drupal\Core\Render\Renderer->doRender() (Line: 227)<br>
Drupal\Core\Render\Renderer->render() (Line: 162)<br>
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 627)<br>
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 157)<br>
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse() (Line: 90)<br>
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray() (Line: 246)<br>
Symfony\Component\EventDispatcher\EventDispatcher::Symfony\Component\EventDispatcher\{closure}() (Line: 206)<br>
Symfony\Component\EventDispatcher\EventDispatcher->callListeners() (Line: 56)<br>
Symfony\Component\EventDispatcher\EventDispatcher->dispatch() (Line: 188)<br>
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)<br>
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)<br>
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)<br>
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)<br>
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 116)<br>
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 90)<br>
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)<br>
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)<br>
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 53)<br>
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)<br>
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 715)<br>
Drupal\Core\DrupalKernel->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: ☠️</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