Skip to content

fix(next-drupal): optimize draft data fetching to support SSG #853

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ksk1kd
Copy link

@ksk1kd ksk1kd commented May 12, 2025

This pull request is for: (mark with an "x")

  • examples/*
  • modules/next
  • packages/next-drupal
  • starters/basic-starter
  • starters/graphql-starter
  • starters/pages-starter
  • Other

GitHub Issue: #852

  • I need help adding tests. (mark with an "x")

Describe your changes

Resolved dynamic server error by checking draft mode before accessing cookies. This maintains SSG while still allowing draft mode when needed.

Resolved dynamic server error by checking draft mode before accessing cookies. This maintains SSG while still allowing draft mode when needed.

Fixes chapter-three#852
Copy link

vercel bot commented May 12, 2025

@ksk1kd is attempting to deploy a commit to the Chapter Three Team on Vercel.

A member of the Team first needs to authorize it.

@longwave
Copy link

I was running into this too:

Error: Page changed from static to dynamic at runtime /my/custom/path, reason: cookies

Patching next-drupal with the change here (and the equivalent change in dist) fixed this issue for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants