Mandatory parameters missing

Created on 25 February 2025, about 1 month ago

Problem/Motivation

With latest version (beta20) I am getting the following error when trying to delete a Group (from `groups` module).

The website encountered an unexpected error. Try again later.

Drupal\Core\Entity\EntityStorageException: Some mandatory parameters are missing ("group") to generate a URL for route "entity.group_content_menu.canonical". in Drupal\Core\Entity\Sql\SqlContentEntityStorage->delete() (line 763 of core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).

Drupal\Core\Routing\UrlGenerator->getInternalPathFromRoute() (Line: 300)
Drupal\Core\Routing\UrlGenerator->generateFromRoute() (Line: 108)
Drupal\Core\Render\MetadataBubblingUrlGenerator->generateFromRoute() (Line: 765)
Drupal\Core\Url->toString() (Line: 41)
Drupal\entity_usage\PreSaveUrlRecorder->recordEntity() (Line: 43)
entity_usage_entity_presave()
call_user_func_array() (Line: 416)
Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}() (Line: 395)
Drupal\Core\Extension\ModuleHandler->invokeAllWith() (Line: 415)
Drupal\Core\Extension\ModuleHandler->invokeAll() (Line: 217)
Drupal\Core\Entity\EntityStorageBase->invokeHook() (Line: 900)
Drupal\Core\Entity\ContentEntityStorageBase->invokeHook() (Line: 529)
Drupal\Core\Entity\EntityStorageBase->doPreSave() (Line: 753)
Drupal\Core\Entity\ContentEntityStorageBase->doPreSave() (Line: 483)
Drupal\Core\Entity\EntityStorageBase->save() (Line: 806)
Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (Line: 354)
Drupal\Core\Entity\EntityBase->save() (Line: 303)
Drupal\group\Entity\GroupRelationship::postDelete() (Line: 460)
Drupal\Core\Entity\EntityStorageBase->delete() (Line: 753)
Drupal\Core\Entity\Sql\SqlContentEntityStorage->delete() (Line: 362)
Drupal\Core\Entity\EntityBase->delete() (Line: 383)
Drupal\group\Entity\Group::preDelete() (Line: 450)
Drupal\Core\Entity\EntityStorageBase->delete() (Line: 753)
Drupal\Core\Entity\Sql\SqlContentEntityStorage->delete() (Line: 362)
Drupal\Core\Entity\EntityBase->delete() (Line: 71)
Drupal\Core\Entity\ContentEntityDeleteForm->submitForm()
call_user_func_array() (Line: 129)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers() (Line: 67)
Drupal\Core\Form\FormSubmitter->doSubmitForm() (Line: 597)
Drupal\Core\Form\FormBuilder->processForm() (Line: 326)
Drupal\Core\Form\FormBuilder->buildForm() (Line: 73)
Drupal\Core\Controller\FormController->getContentResult() (Line: 39)
Drupal\layout_builder\Controller\LayoutBuilderHtmlEntityFormController->getContentResult()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 638)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 116)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 90)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 741)
Drupal\Core\DrupalKernel->handle() (Line: 19)

The error doesn't happen with beta19.
I updated from beta16 to beta20 when I found out about this.

Steps to reproduce

Still collection information, but adding and trying to delete a group seems to be enough.

πŸ› Bug report
Status

Active

Component

Code

Created by

πŸ‡¬πŸ‡·Greece bserem

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024