Troubleshoot common issues
Quick answers to the problems reported most often by real users, from the missing Vue template box to site-wide JSON:API 403 failures.
This page covers the issues that account for most of the confusion reported by real users over the life of this project. Each entry is a quick answer, with a link wherever a fuller explanation exists.
5 of 21 issues
Drupal backend
Every JSON:API request 403s, even for content that should be public Grant the Access DruxtJS JSON:API resources permission.
Druxt gates all of its JSON:API access behind one Drupal permission:
access druxt resources. Without it, requests can fail in ways that
don't obviously point at that permission. Errors instead reference whatever
the underlying JSON:API resource would normally require (e.g. entity
display-related admin permissions) rather than the Druxt permission itself.
If JSON:API access fails site-wide right after installing the Drupal Druxt module,
check Drupal → People → Permissions for Access DruxtJS JSON:API
resources (machine name access druxt resources)
before debugging anything else. The quickstart
grants this automatically. Installing Druxt on an existing site does not.
See the druxt module reference for the
full installation steps.
"…has been blocked by CORS policy" in the browser console Configure CORS in Drupal, or proxy the API through Nuxt.
The browser is refusing a cross-origin request to Drupal. Only requests
made by the browser can fail this way, so a site that server-renders
fine and breaks on navigation or live data is failing here. Two fixes, pick
one: configure CORS in Drupal so the backend
answers cross-origin requests, or proxy the API through the
frontend so no request is cross-origin (server deployments
only). druxt-menu releases before 0.22.0 sent <DruxtMenu>'s browser
requests straight to Drupal even with the proxy on, so a proxied site
could still fail here on its menu. Request
topology explains when each applies.
Writes fail while reads work, on druxt before 1.3.0 drupal/druxt before 1.3.0 allows no CORS methods. Upgrade to 1.3.1.
drupal/druxt releases before 1.3.0 enabled CORS but left
allowedMethods empty, which matches no method. Reads pass without a
preflight. A JSON:API write, or any request with an Authorization
header, is preflighted and fails. Upgrade, then rebuild the cache so
Drupal rebuilds its service container:
composer require drupal/druxt:^1.3.1
drush cache:rebuildOr configure allowedMethods yourself, as Configure CORS in
Drupal recommends. A site that already did was
never affected.
Routes and Views paths stop resolving after a composer update drupal/druxt 1.2.1 and earlier break on Decoupled Router 2.0.7. Upgrade.
composer update brings Decoupled Router 2.0.7, and drupal/druxt 1.2.1
and earlier fatal against it: their path translator overrides
onPathTranslation() without the : void return type 2.0.7 declares.
The symptom is quiet rather than loud. The fatal happens while the
container rebuilds, so Drupal keeps serving from the old container and the
visible effect is routes and Views paths silently not resolving, not an
error page. drush cr is usually where it first shows.
Fix by upgrading to the release that includes it:
composer require drupal/druxt:^1.3.1
drush cr1.2.2 has the fix and also ends Drupal 8 and 9 support, so this applies on core 10 or later. See #3618675.
The status report says a Druxt resource is missing Harmless on 1.3.0, and 1.3.1 stops the warning.
On 1.3.0 the report lists configurable_language as missing on a site
without the Language module, and jsonapi_resource_config without
JSON:API Extras. Nothing is broken, since the frontend never asks for a
resource the site does not have. 1.3.1 stops the warning.
Still stuck?
- Ask the docs. The docs MCP server, at
https://druxtjs.org/mcp, lets an AI assistant search and read these pages. MCP, the Model Context Protocol, is how AI assistants connect to outside tools. - Search the existing issues before you report. Each part of Druxt
has its own queue:
- Druxt, the Nuxt modules: github.com/druxt/druxt.js
- DruxtAuth, the login module: github.com/druxt/druxt-auth
- The Drupal Druxt module: drupal.org/project/issues/druxt
- JSON:API Views: drupal.org/project/issues/jsonapi_views
- Simple OAuth: drupal.org/project/issues/simple_oauth
- Decoupled Router and JSON:API Menu Items, on GitLab work items: decoupled_router and jsonapi_menu_items.
- Report a Druxt bug or ask for a feature with a new issue. Include the steps to reproduce and your Druxt, Nuxt, Node and Drupal versions.
- Fix it yourself. The druxt.js contributing guide explains how.