Next.js Discord

Discord Forum

dynamicParams and Draft Mode

Unanswered
Himalayan posted this in #help-forum
Open in Discord
HimalayanOP
I'm finding that when generating pages in combination with dynamicParams set to false that the pages will not build at request for Draft Mode.

Have checked that the bypass cookie is present and it is. If I set dynamicParams true then Draft Mode works and the page builds on request. But then ofcourse any page can be visited on request and return a blank content page.

Is this intended behaviour? And if it is do I have to implement some sort of work around where I let the request time page build, check if content was fetched and if it wasn't redirect to 404?

4 Replies

HimalayanOP
Bump
HimalayanOP
Unfortunately draft mode just hits 404 with dynamic params false.
HimalayanOP
Feel like this is bugged
HimalayanOP
Getting this in production

⨯ Error: Invariant: expected pageData to be a string, got undefined