Release Notes

Contents

For Next.XP 5 and earlier release notes, select the 5.x documentation version.

Next.XP 6

Next.XP 6 replaces the XP-side preview proxy with a custom Next.js preview in Content Studio. Content Studio loads the front end directly from Next.js. This release also moves to Guillotine 9 and requires Enonic XP 8.1, as well as Content Studio 6.1 or later.

New Content Studio preview

The Next.XP app 6 provides the "Next.js Preview" live view extension in Content Studio. It fetches URL mapping rules from the front end’s new /api/mappings endpoint, caches them per project, resolves the selected content item to a Next.js URL, and lets Content Studio load that URL directly from the Next.js server. Site setup is unchanged: add the Next.XP app to the XP site and select its front-end configuration.

The /api/renderable endpoint is no longer used.

Visual page editing

Next.js-rendered pages now support visual page editing through the @enonic/page-editor npm package, bundled with the front-end. It enables component drag-and-drop and click-to-select, and can also be used with other frameworks.

Macros now render in Content Studio as they do on the public site.

Encrypted token

Requests from XP to /api/preview, /api/mappings, and /api/revalidate now carry an xp parameter encrypted with the shared secret, instead of plain text values.

ENONIC_API_TOKEN is still required and is now the encryption key. The adapter exports encryptParams() and decryptParams().

Next.js draft mode

Next.XP 6 uses Next.js cookie-based Draft Mode. The starter’s src/proxy.ts validates the xp parameter, enables draft mode through /api/preview when the draft cookie is missing or belongs to another build (BUILD_ID in next.config.js), and redirects to the same URL without the parameter. Draft mode alone switches the adapter to edit render mode.

Draft mode persists while the browser’s draft cookie remains valid. Opening the same front-end URL directly, including in a new tab outside Content Studio, therefore continues to show draft content.

The adapter’s DraftModeIndicator provides a button to exit draft mode when the page is opened outside Content Studio. The starter includes it in the page layout. Clicking the button disables draft mode and reloads the page without the preview parameter, returning to the live site with published content.

Default-locale URL redirects

URLs without a default-locale prefix were already supported in Next.XP 5, and the adapter generated public links without that prefix. In v6, the starter also redirects explicitly prefixed URLs to the URL without the default locale.

For example, with ENONIC_MAPPINGS=en:website/site,no:website-no/site, en is the default because it is listed first. For ordinary public requests:

Requested URL v5 starter v6 starter

/about

Serves English content; browser URL stays /about.

Same behavior.

/en/about

Serves English content; browser URL stays /en/about.

Redirects to /about.

/en

Serves the English home page; browser URL stays /en.

Redirects to /.

/no/about

Serves Norwegian content; browser URL stays /no/about.

Same behavior: non-default locales keep their prefix.

Internally, /about is still rewritten to /en/about for the Next.js locale route. A rewrite leaves the browser URL unchanged; the new redirect changes it. The v6 pageUrl() helper continues to omit the default locale from generated public links. See Routing for details.

Automatic Content Studio CSP handling

The Next.XP app uses XP 8.1’s new Content Security Policy API through an extension response processor. It adds the configured front-end origins to Content Studio’s frame-src, connect-src, and style-src directives, extending the existing policy automatically.

Manual contentSecurityPolicy.header configuration for Next.XP is no longer needed. When no front-end URL is configured, the app allows http://localhost:3000 as a fallback in dev mode only.

CORS headers

The starter’s next.config.js sets CORS headers allowing the XP admin origin, taken from the new optional ENONIC_ADMIN variable or the origin of ENONIC_API.

Guillotine 9

Queries pass scopeKey, project, and branch to the guillotine() field instead of relying on the endpoint URL. The adapter supplies these variables to every registered query. The scopeKey selects the site used as the base for site-relative page paths.

The adapter also exposes the project, site, and branch in its rendering metadata, making the content context available to custom views.

Front-end URL handling

Guillotine 9 returns URL components from pageUrl, imageUrl, mediaUrl, and attachmentUrl, including path and queryString, instead of complete URL strings. The front-end now constructs the final URLs using its own routing and deployment configuration. This gives it control over public page paths, locale prefixes, and media or CDN hosts.

The Next.js adapter provides helpers for this:

  • Page links: pageUrlQuery() selects the URL components; pageUrl(data, meta) builds a relative Next.js URL, adds a prefix for non-default locales, and preserves query parameters.

  • Images and attachments: imageUrlQuery(), mediaUrlQuery(), and attachmentUrlQuery() select the components. Their matching URL helpers combine them with ENONIC_MEDIA_CDN, which defaults to ENONIC_API. XP no longer needs media.defaultBaseUrl configuration.

  • Rich text: richTextQuery() retrieves structured link and image data alongside the HTML. RichTextView uses it to replace URL placeholders with front-end URLs.

Custom queries and views must adopt this model. See Rich text, links, and media for Next.XP usage and Guillotine URL components for the underlying fields.

New API URL format

ENONIC_API points to the XP API root (for example http://localhost:8080/api) instead of the /site endpoint. The Guillotine endpoint is ENONIC_API + / + GUILLOTINE_API (default com.enonic.app.guillotine:graphql).

See the upgrade notes for migration steps, removed APIs, and changed function signatures.


Contents

Contents