(v 3.2) Commerce facets break pages after updating to 3.1

Created on 10 December 2022, over 1 year ago
Updated 5 March 2024, 4 months ago

Problem/Motivation

After updating from 8.2.2 to 3.1, when I try to visit a link from the block of commerce product facets, I get a broken page with the following error:

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

UnexpectedValueException: External URLs do not have internal route parameters. in Drupal\Core\Url->getRouteParameters() (line 583 of core/lib/Drupal/Core/Url.php).
Drupal\d_commerce_products_list\Plugin\facets\url_processor\DCommerceProductListUrlProcessor->buildUrls(Object, Array) (Line: 76)
Drupal\facets\Plugin\facets\processor\UrlProcessorHandler->build(Object, Array) (Line: 339)
Drupal\facets\FacetManager\DefaultFacetManager->processBuild(Object) (Line: 387)
Drupal\facets\FacetManager\DefaultFacetManager->build(Object) (Line: 90)
Drupal\facets\Plugin\Block\FacetBlock->build() (Line: 171)
Drupal\block\BlockViewBuilder::preRender(Array)
call_user_func_array(Array, Array) (Line: 101)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. See https://www.drupal.org/node/2966725', 'exception', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 772)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 363)
Drupal\Core\Render\Renderer->doRender(Array, 1) (Line: 201)
Drupal\Core\Render\Renderer->render(Array, 1) (Line: 157)
Drupal\Core\Render\Renderer->Drupal\Core\Render\{closure}() (Line: 564)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 158)
Drupal\Core\Render\Renderer->renderPlain(Array) (Line: 172)
Drupal\Core\Render\Renderer->renderPlaceholder('', Array) (Line: 649)
Drupal\Core\Render\Renderer->replacePlaceholders(Array) (Line: 534)
Drupal\Core\Render\Renderer->doRender(Array, 1) (Line: 201)
Drupal\Core\Render\Renderer->render(Array, 1) (Line: 145)
Drupal\Core\Render\Renderer->Drupal\Core\Render\{closure}() (Line: 564)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 146)
Drupal\Core\Render\Renderer->renderRoot(Array) (Line: 279)
Drupal\Core\Render\HtmlResponseAttachmentsProcessor->renderPlaceholders(Object) (Line: 128)
Drupal\Core\Render\HtmlResponseAttachmentsProcessor->processAttachments(Object) (Line: 45)
Drupal\Core\EventSubscriber\HtmlResponseSubscriber->onRespond(Object, 'kernel.response', Object)
call_user_func(Array, Object, 'kernel.response', Object) (Line: 142)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.response') (Line: 202)
Symfony\Component\HttpKernel\HttpKernel->filterResponse(Object, Object, 1) (Line: 190)
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: 709)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Steps to reproduce

I tried to reproduce in a new Droopler installation but currently the install script isn't running due to another issue that's currently open.

In any case, I have a site with very little custom configurations.

I have products with 4 different categories.

The categories block shows well on /shop

When I click any of the categories, I get the error above.

🐛 Bug report
Status

Fixed

Version

3.1

Component

Code

Created by

🇺🇸United States jcmartinez Raleigh, NC, USA

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024