Consumer Node Preview Brings Unsaved Content Previews to Decoupled Drupal

Unsaved Drafts Reach the Frontend Without a Saved Revision
A blue promotional graphic from The Drop Times featuring Stuart Clark smiling in black glasses on the right. The text reads "DISCOVER DRUPAL" and "Check the Frontend Before Saving" followed by "Consumer Node Preview lets editors inspect unsaved Drupal changes on decoupled frontends, with RC1 adding preview-target controls and fixes." A nameplate reads "Stuart Clark" and the footer displays "Follow us on" with social media icons, "https://www.thedroptimes.com/" and The Drop Times logo.

Editors on fully decoupled Drupal websites can inspect changes that have not yet been saved in the frontend used by readers with Consumer Node Preview 1.0.0-rc1. Maintainer Stuart Clark explained the approach in a 12 November 2026 technical post, showing how an editor can preview a revised title and paragraph through a Druxt frontend directly from Drupal's edit form. The module's release candidate was issued on 11 November 2026.

Drupal core's Preview displays content using Drupal's own theme, which can differ substantially from a separate frontend. Teams may otherwise save a draft or revision to inspect it in the intended interface. Consumer Node Preview instead connects the edit form's unsaved node data to a compatible frontend preview route. The frontend must implement the corresponding JSON:API retrieval and rendering; installing the Drupal module alone does not create a working preview in Next.js, Astro or other applications.

How Unsaved Content Reaches a Separate Frontend

The module builds on JSON:API Node Preview and integrates with Consumers. Preview targets are defined per consumer through a label and URL template, allowing different frontend applications or deployment environments to provide their own preview pages. Clark describes Frontend, Drupal and JSON:API tabs: the first renders the target page, the second retains Drupal's normal preview, and the third exposes the JSON:API document for troubleshooting missing fields.

Target URLs can be defined in the consumer configuration or in settings.php where addresses vary by environment. The frontend must permit embedding in Drupal's preview interface: restrictive X-Frame-Options headers or a Content Security Policy frame-ancestors directive that excludes Drupal's origin will prevent the framed preview from appearing. The system also supports selecting Drupal view modes and frontend layouts, provided the frontend understands those settings.

Authentication and Preview-Token Boundaries

Authentication depends on deployment. On related domains that can share an editor's session, a frontend may retrieve the unsaved preview using that session, with Drupal's CORS configuration explicitly permitting the frontend origin and credentials. For a frontend on an unrelated domain, Clark describes using Simple OAuth with a consumer's Authorization Code grant and a dedicated preview-role scope. A scope configured only under Default scopes is insufficient for the described flow; it can leave preview requests returning HTTP 403.

The cross-domain flow uses a short-lived preview token, described as valid for 15 minutes by default. The preview endpoint and token are passed in the URL fragment, after #, rather than in the path or query string. Browsers ordinarily do not transmit fragments in HTTP requests, limiting exposure in conventional server and CDN access logs and request referrers. This is not complete secrecy: scripts loaded on the preview page can read the fragment. Clark advises keeping analytics, error-tracking and session-replay tools off preview routes, and validating the origin from which a frontend will fetch preview data.

Druxt Example and Remaining Limitations

Clark reports that Druxt Node Preview 0.1.0 already powers previews on druxtjs.org. The Nuxt integration can register and refresh its own Drupal preview target, remove it during a clean shutdown and let inactive registrations expire after a day. That particular package is intended for the older Nuxt 2 and Node 16 environment; a Next.js, Astro or Nuxt 3 frontend would need its own preview-page implementation rather than relying on Druxt's Nuxt integration.

The author says Consumer Node Preview remains a release candidate while its JSON:API Node Preview dependency is in beta. Previewing unsaved Paragraphs data also requires the patch in Drupal issue #3367724 in the described Druxt setup; the patch should be tested for the installation concerned rather than treated as an already-merged core fix. The difference-highlighting toggle shown in Clark's screenshot is an early implementation on druxtjs.org, not a generally available feature established by the 1.0.0-rc1 release.

For decoupled Drupal teams, the release addresses an editorial workflow gap: assessing unsaved changes in the interface readers will actually see. Adoption still requires a compatible frontend route, appropriate preview permissions, careful handling of short-lived credentials and testing of any Paragraphs integration before use with sensitive drafts. Those deployment requirements are part of the reported implementation, not capabilities that The DropTimes independently tested.

Disclosure: This content is produced with the assistance of AI.

Note: The vision of this web portal is to help promote news and stories around the Drupal community and promote and celebrate the people and organizations in the community. We strive to create and distribute our content based on these content policy. If you see any omission/variation on this please reach out to us at #thedroptimes channel on Drupal Slack and we will try to address the issue as best we can.

Upcoming Events

Latest Opportunities