Skip to content

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.

3 of 21 issues

Stale or changed content

I changed a Drupal display and nothing happened on the frontend Schemas are built at startup. Restart, or turn on schema.refresh.

By default, schemas are generated once, at startup or at build. Content edits show live; a rearranged display, a changed formatter or a new view mode waits for a restart of nuxt dev or a rebuild. From druxt 0.25.0, druxt.schema.refresh makes the Nuxt server regenerate a schema after each cache clear, and on every request under nuxt dev:

// nuxt.config.js
export default {
  druxt: {
    schema: { refresh: true },
  },
}

A static site keeps the schemas from its build, unless its own Node server serves the route with createSchemaRefresh. The schema system explains the timing.

Copy link
Edited content stays stale on a server-rendered site The Nuxt server cache keeps it for max_age. Set up the clear endpoint.

From druxt 0.25.0 the Nuxt server keeps the JSON:API index and the menus between requests, and with cache.content the entities, collections, Views results and routes too, for as long as Drupal's page cache max_age allows. An edit to any of them waits for that time to pass or for a cache clear. Each Nuxt process has a cache of its own, and the cache is off under nuxt dev, so the problem does not show there. Check max_age under Drupal → Configuration → Development → Performance: at the default of 0 nothing is kept and the cause is elsewhere. Then set up the clear endpoint so Drupal empties the cache on a change, and clear each process on a site that runs several: Cache Drupal responses on the Nuxt server. In code, this.$store.dispatch('druxt/clearCache') clears everything, schemas included.

Copy link
A production site stops working after nuxt dev nuxt dev replaced the build. Build again and restart.

nuxt dev and nuxt build both write to .nuxt, so running the dev server replaces the build a running nuxt start is serving. Run nuxt build again, then restart it.

Copy link

Still stuck?