I have a content type called Sprint, and wanted to customize its layout, so I added a new variant if type Panel in the node_view page with the condition being type: sprint. The layout works fine for all the Sprint pages, but when I navigate to any other node/{node} page of other content type, I get an internal server error.
Log messages give this:
Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException: No route found for "GET /node/251": Method Not Allowed (Allow: DELETE, PATCH) in Symfony\Component\HttpKernel\EventListener\RouterListener->onKernelRequest() (line 180 of /data/disk/o5013607723/static/newborn_1.0b10/vendor/symfony/http-kernel/EventListener/RouterListener.php).
Is anyone else facing an issue like this?
Comment | File | Size | Author |
---|---|---|---|
#5 | page_variant_for_node-2782661-5.patch | 1.53 KB | sylus |
Comments
Comment #2
snehi CreditAttribution: snehi as a volunteer and at Publicis Sapient for Publicis Sapient commentedyes facing the same issue.
Comment #3
yesnoio CreditAttribution: yesnoio commentedI too seem to be having the same problem. The
PageManagerRoutes::alterRoutes
method loops through allpage
entity types, removing the route to each page entity if a matching route exists. Before removing a matching route, information is gathered about the route.The method then builds a new route for each variation of the
page
entity type, adding the new route back into the collection of routes associated with the currentRouteBuildEvent
instance.The building of the new route seems to be where the issue is. Digging deeper. Thoughts?
When attempting to set the site default page to something like
node/407
, Drupal responds withThe path '/node/407' is either invalid or you do not have access to it.
Pages, such asnode/add
, result in aMethodNotAllowedException
& a 404 response.drupal 8.1.9
page_manager 8.x-1.0-alpha24
ctools 8.x-3.0-alpha27
Comment #4
sylus CreditAttribution: sylus commentedAm also having this problem as well with the exact same reproduction. Also affects the "node.add_page" route.
Comment #5
sylus CreditAttribution: sylus commentedHere is an initial hack that exempts the routes that are still accessible as a temporary workaround.
Comment #6
mkostrzewa CreditAttribution: mkostrzewa commentedHi Sylus,
I assume that patch worked for you. I seem to be getting a similar issue, where I get 'You are not authorized to access this page"
Comment #7
tim.plunkettThis should be handled by #2736385: Page Manager routing is overly complex and brittle: breaks REST, active trail, fallback pages now. Not closing this yet, but please try that patch out.
Comment #8
tim.plunkettThis has now been fixed by #2736385: Page Manager routing is overly complex and brittle: breaks REST, active trail, fallback pages