Error with a custom router.

Created on 20 November 2024, about 1 month ago

Problem/Motivation

Error appear when custom router on taxonomy term page with local task link

The website encountered an unexpected error. Please try again later.

Error: Call to a member function get() on string in Drupal\taxonomy_term_locks\Service\TaxonomyTermLocksService->getVidFromRoute() (line 92 of modules/contrib/taxonomy_term_locks/src/Service/TaxonomyTermLocksService.php).
taxonomy_term_locks_form_alter(Array, Object, 'search_block') (Line: 545)
Drupal\Core\Extension\ModuleHandler->alter('form', Array, Object, 'search_block') (Line: 840)
Drupal\Core\Form\FormBuilder->prepareForm('search_block', Array, Object) (Line: 284)
Drupal\Core\Form\FormBuilder->buildForm('Drupal\unhcr_search\Form\SearchForm', Object) (Line: 224)
Drupal\Core\Form\FormBuilder->getForm('Drupal\unhcr_search\Form\SearchForm') (Line: 53)
Drupal\unhcr_search\Plugin\Block\SearchBlock->build() (Line: 77)
project_preprocess_page(Array, 'page', Array)
call_user_func_array('project_preprocess_page', Array) (Line: 285)
Drupal\Core\Theme\ThemeManager->render('page', Array) (Line: 445)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 204)
Drupal\Core\Render\Renderer->render(Array) (Line: 474)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 98)
__TwigTemplate_0e076d34e118b046f9d81d9e57eabac7->doDisplay(Array, Array) (Line: 394)
Twig\Template->displayWithErrorHandling(Array, Array) (Line: 367)
Twig\Template->display(Array) (Line: 379)
Twig\Template->render(Array) (Line: 38)
Twig\TemplateWrapper->render(Array) (Line: 53)
twig_render_template('themes/custom/project/templates/system/html.html.twig', Array) (Line: 372)
Drupal\Core\Theme\ThemeManager->render('html', Array) (Line: 445)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 204)
Drupal\Core\Render\Renderer->render(Array) (Line: 158)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 592)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 159)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.view') (Line: 186)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
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: 280)
Drupal\shield\ShieldMiddleware->bypass(Object, 1, 1) (Line: 137)
Drupal\shield\ShieldMiddleware->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 124)
Drupal\cloudflare\CloudFlareMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Steps to reproduce

  1. Create a new view for listing entities.
  2. Create a local task link to access the new view from the taxonomy term canonical.
  3. Open a taxonomy term to see the error appear.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇯🇴Jordan abu-zakham

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