Services

Fix Next.js Draft Mode and CMS Preview Iframe Failures

Bring me in when preview technically exists but editors cannot rely on it because cookies, auth, iframe rules, or route handling keep breaking in practice.

Restore reliable draft mode and CMS preview flows so editors can review unpublished content without fighting cookies, auth, or iframe failures.

Typical symptoms

  • Editors cannot open preview routes reliably from the CMS.
  • Preview cookies, auth state, or iframe behaviour are inconsistent by environment.
  • Draft content preview works sometimes, but not predictably enough for editorial work.

Likely causes

  • Preview entry points are not aligned with environment, auth, or cookie behaviour.
  • Draft mode is enabled inconsistently across routes or content types.
  • The CMS preview model was added without enough platformlevel guardrails.

What I look at first

  • Quick check: reproduce preview from the CMS entry point across the affected environments and content types, not just from a copied URL.
  • Whether the failure is routespecific, environmentspecific, or iframespecific.
  • Which content types or page templates are affected first.

How I help fix this

  • Reduce the issue to the actual route, auth, or cookie problem.
  • Stabilise the preview path for the important content types first.
  • Support rollout of a preview flow that editors can trust.

When to bring me in

  • Bring me in when preview is blocking editorial QA or delaying content release.
  • Bring me in when the preview flow exists on paper but breaks often enough that teams work around it.

Related project experience

  1. Nando’s

    Senior software engineer on the UK and Ireland replatform, migrating Nando’s customerfacing websites from legacy Drupal to a unified headless platform built with Next.js and Storyblok, with a focus on performance, accessibility, and SEO.

    Screenshot of the Nando’s website; part of John Kavanagh's development portfolio.

Supporting technical articles

Related services

  1. Parent hub

    Headless CMS Integration

    Choose the right CMS operations fix when preview, freshness, or editorial performance has stopped being trustworthy.

  2. Capability

    Headless Architecture Consulting

    Bring in headless CMS consulting when CMS architecture, SEO controls, preview trust, or revalidation decisions are about to lock in operational pain.

  3. Related page

    Headless CMS Integration

    Choose the right CMS operations fix when preview, freshness, or editorial performance has stopped being trustworthy.

Questions teams usually ask

Is this usually a CMS problem or a Next.js problem?
It can be either, but most failures sit at the join between them: preview URLs, cookies, auth state, iframe restrictions, or route handling that only breaks under editorial preview conditions.
Can you fix this without redesigning the whole preview model?
Usually yes. The first step is to stabilise the current preview flow for the important content types, then decide whether the wider preview architecture also needs to be simplified.

Tell me what needs fixing

Send me the affected page or route, point me at the code if that helps, and tell me what you expected to happen versus what is happening now. If this connects to a Next.js migration, technical SEO drop, performance issue, launch, or platform move, include that context too. I'll come back with the clearest next step.

Skip past clients

Previous Clients