Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The rest module is doing things with routes. And route manager page manager is also doing things with routes...
To reproduce:
- Install page_manager
- Install rest
Vist: admin/structure/page_manager
The website encountered an unexpected error. Please try again later.
Symfony\Component\Routing\Exception\MethodNotAllowedException: in Symfony\Component\Routing\Matcher\UrlMatcher->match() (line 97 of vendor/symfony/routing/Matcher/UrlMatcher.php).
Drupal\Core\Routing\UrlMatcher->finalMatch(Object, Object)
Symfony\Cmf\Component\Routing\NestedMatcher\NestedMatcher->matchRequest(Object)
Symfony\Cmf\Component\Routing\DynamicRouter->matchRequest(Object)
Symfony\Cmf\Component\Routing\ChainRouter->doMatch('/node/{node}')
Symfony\Cmf\Component\Routing\ChainRouter->match('/node/{node}')
Drupal\Core\Path\PathValidator->getPathAttributes('node/{node}', Object, )
Drupal\Core\Path\PathValidator->getUrl('node/{node}', )
Drupal\Core\Path\PathValidator->getUrlIfValidWithoutAccessCheck('node/{node}')
Drupal\Core\Url::fromInternalUri(Array, Array)
Drupal\Core\Url::fromUri('internal:/node/{node}', Array)
Drupal\Core\Url::fromUserInput('/node/{node}')
Drupal\page_manager\Entity\PageListBuilder->getPath(Object)
Drupal\page_manager\Entity\PageListBuilder->buildRow(Object)
Drupal\Core\Entity\EntityListBuilder->render()
Drupal\page_manager\Entity\PageListBuilder->render()
Drupal\Core\Entity\Controller\EntityListController->listing('page')
call_user_func_array(Array, Array)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
call_user_func_array(Object, Array)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1)
Stack\StackedHttpKernel->handle(Object, 1, 1)
Drupal\Core\DrupalKernel->handle(Object)
Comment | File | Size | Author |
---|---|---|---|
#2 | 2619700-pathvalidator-2-PASS.patch | 6.16 KB | tim.plunkett |
#2 | 2619700-pathvalidator-2-FAIL.patch | 5.3 KB | tim.plunkett |
Comments
Comment #2
tim.plunkettThis is actually a core bug. \Drupal\Core\Path\PathValidator::getPathAttributes() is not documented as throwing any exceptions, so it should be safe to call.
However, it only catches 3 of the 4 exceptions that are possible.
Comment #4
tim.plunkettThese are the only lines absolutely needed. The rest of the test changes I did to figure out where coverage was coming from, and could be committed separately, or left here as-is.
Comment #5
jibranI think this is fine as is.
Comment #9
catchCommitted/pushed to 8.1.x and cherry-picked to 8.0.x, thanks!