White screen on route /node/add from error Symfony\Component\Routing\Exception\MissingMandatoryParametersException: Some mandatory parameters are missing ("node") to generate a URL for route "entity.node.canonical".

Created on 9 March 2022, over 3 years ago
Updated 5 August 2025, about 1 month ago

Problem/Motivation

When DruxtJS is installed on our Drupal 8 site we get a white screen on the route /node/add.

Going directly to a specific content type works though, like /node/add/page

The error logged is:

Symfony\Component\Routing\Exception\MissingMandatoryParametersException: Some mandatory parameters are missing ("node") to generate a URL for route "entity.node.canonical". i Drupal\Core\Routing\UrlGenerator->doGenerate() (rad 182 av /var/www/html/docroot/core/lib/Drupal/Core/Routing/UrlGenerator.php).

Uninstalling DruxtJS fixes the problem.

I'm not clear on if this always happens with DruxtJS or if it is an interaction with another module.

My colleague tracked the problem to line 19 in druxt.module in the function druxt_access_check:
$route = \Drupal::routeMatch()->getRouteObject();

Steps to reproduce

  • Go to /node/add
πŸ› Bug report
Status

Closed: outdated

Version

1.1

Component

Code

Created by

πŸ‡ΈπŸ‡ͺSweden emdahlstrom

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.71.5 2024