- Issue created by @thatguy
- ๐ธ๐ฎSlovenia alecsmrekar
This is caused by the redirect module. The patch in here should fix it: https://www.drupal.org/project/redirect/issues/3314032 โ
- Status changed to Needs review
over 1 year ago 11:59am 5 April 2023 - ๐ซ๐ฎFinland thatguy
The patch from the linked redirect issue fixed this for me, thanks!
- ๐ฌ๐งUnited Kingdom welly
Not working for me unfortunately. I'm getting the same error with or without the patch.
- Status changed to Needs work
about 1 year ago 9:32am 19 September 2023 - ๐ฌ๐งUnited Kingdom welly
I've uninstalled redirect module and I still get the following error:
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 761 of core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php). Drupal\Core\Routing\UrlGenerator->getInternalPathFromRoute('entity.group_content_menu.canonical', Object, Array) (Line: 132) Drupal\Core\Routing\UrlGenerator->getPathFromRoute('entity.group_content_menu.canonical', Array) (Line: 68) Drupal\Core\Render\MetadataBubblingUrlGenerator->getPathFromRoute('entity.group_content_menu.canonical', Array) (Line: 802) Drupal\Core\Url->getInternalPath() (Line: 32) Drupal\path\Plugin\Field\FieldType\PathFieldItemList->computeValue() (Line: 33) Drupal\pathauto\PathautoFieldItemList->computeValue() (Line: 34) Drupal\path\Plugin\Field\FieldType\PathFieldItemList->ensureComputedValue() (Line: 15) Drupal\pathauto\PathautoFieldItemList->delegateMethod('preSave') (Line: 191) Drupal\Core\Field\FieldItemList->preSave() (Line: 938) Drupal\Core\Entity\ContentEntityStorageBase->invokeFieldMethod('preSave', Object) (Line: 888) Drupal\Core\Entity\ContentEntityStorageBase->invokeHook('presave', Object) (Line: 563) Drupal\Core\Entity\EntityStorageBase->doPreSave(Object) (Line: 753) Drupal\Core\Entity\ContentEntityStorageBase->doPreSave(Object) (Line: 517) Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 804) Drupal\Core\Entity\Sql\SqlContentEntityStorage->save(Object) (Line: 339) Drupal\Core\Entity\EntityBase->save() (Line: 294) Drupal\group\Entity\GroupRelationship::postDelete(Object, Array) (Line: 494) Drupal\Core\Entity\EntityStorageBase->delete(Array) (Line: 751) Drupal\Core\Entity\Sql\SqlContentEntityStorage->delete(Array) (Line: 347) Drupal\Core\Entity\EntityBase->delete() (Line: 101) Drupal\group_content_menu\Entity\GroupContentMenu::preDelete(Object, Array) (Line: 484) Drupal\Core\Entity\EntityStorageBase->delete(Array) (Line: 751) Drupal\Core\Entity\Sql\SqlContentEntityStorage->delete(Array) (Line: 347) Drupal\Core\Entity\EntityBase->delete() (Line: 71) Drupal\Core\Entity\ContentEntityDeleteForm->submitForm(Array, Object) call_user_func_array(Array, Array) (Line: 114) Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 52) Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 597) Drupal\Core\Form\FormBuilder->processForm('group_content_menu_subsite_menu_delete_form', Array, Object) (Line: 325) Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73) Drupal\Core\Controller\FormController->getContentResult(Object, Object) call_user_func_array(Array, Array) (Line: 123) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580) Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 169) Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81) Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58) Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48) Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106) Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85) Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48) Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51) Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23) Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718) Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
So I don't think this is related to redirect.
- ๐ฌ๐งUnited Kingdom welly
Just as an update, I also uninstalled pathauto, ran drush cr and I didn't get the error when deleting a menu link. So I guess it's all related somewhere. Will do some further investigation.
- ๐ฎ๐ณIndia sumit-k
I encountered the same issue and found that Patch #2 provided in the following link: https://www.drupal.org/project/redirect/issues/3314032 โ resolved the issue effectively in my case. Additionally, I contributed another approach to handle exceptions within the same discussion thread.
- ๐ฉ๐ชGermany Istari
Mysdiir โ made their first commit to this issueโs fork.
- ๐ฉ๐ชGermany Istari
I am facing nearly the same issue, but with another error message:
I built a deriver for adding two static menu links for each group, which worked fine. The links are on the group available and are working.
When clicking on the Edit button on/group/{gid}/menus
the following warning appears:Warning: Undefined array key "url" in /var/www/html/web/modules/contrib/group_content_menu/src/Form/GroupContentMenuForm.php on line 322 The website encountered an unexpected error. Try again later. Error: Call to a member function access() on null in Drupal\group_content_menu\Form\GroupContentMenuForm->buildOverviewTreeForm() (line 322 of modules/contrib/group_content_menu/src/Form/GroupContentMenuForm.php).
This is shown in the browser as well in the recent log messages.
When changingDrupal\group_content_menu\Form\GroupContentMenuForm->buildOverviewTreeForm()
in line 322 fromif (!$operation['url']->access()) { unset($operations[$key]); }
to
if (!empty($operation['url'])) { if (!$operation['url']->access()) { unset($operations[$key]); } }
The error is solved.
I am currently unsure if this issue is the right one, and I am also unsure if I should make a patch (haven't written a patch before, but I know the tutorials for it).Maybe you could help me.
- heddn Nicaragua
I think the error you are facing is more closely related to ๐ access() on null when permission is not properly configured. Needs work .
- ๐ฉ๐ชGermany Istari
oh okay thank for the info.
It is exactly the same solution with my patch.
What is the next step now that the patch is no longer needed? Does the maintainer close the branch? Shall I delete it? - ๐ซ๐ทFrance MacSim
I had the same issue and after upgrading Redirect from 1.09 to 1.10 (which include the related patch in #2) the error is gone.