-
Notifications
You must be signed in to change notification settings - Fork 176
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
Unpublishing a published page does not revalidate #772
Comments
Hey, did you manage to make revalidation work ? I'm trying to test the Nextjs revalidatePath function but it does not seem to be working. Could you briefly tell me how's your setup ? |
Hi @MontiMarco92
As I mentioned, on frontend I'm using:
And on Drupal: Below is the content for
To revalidate any page we can make a GET request to Please let me know if you need any help. |
ahh I see.. but you're still working with the pages router, right ? I'm trying to use the App router, hence the usage of the new revalidatePath function, and it's not working for me at the moment. But thanks for answering! |
Yes, I'm still using the pages router. Sorry I have no idea how it works in the app router. Good luck! |
Hey @MontiMarco92 Have you implemented the "preview" mode? Take a look at #496. Maybe that's your missing piece :) |
Thanks @blyme for your suggestion! I've made it work! |
Package containing the bug
next-drupal (NPM package)
Describe the bug
A published page shows fine on front-end. But when we unpublish a page it's not revalidating, and the page keep showing on frontend.
I'm seeing below error in Drupal:
GuzzleHttp\Exception\ClientException: Client error:
GET https://example.com/api/revalidate?path=/test-page&secret=test-secret
resulted in a404 Not Found
response: {"message":"Failed to revalidate /test-page/: Invalid response 500"} in GuzzleHttp\Exception\RequestException::create() (line 113 of /var/www/drupal-website/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php).On frontend I'm using:
On Drupal I'm using
drupal/next:^2.0@beta
Expected behavior
Unpublishing a published page should revalidate and should not be visible on frontend afterwards.
Steps to reproduce:
Additional context
I was earlier using
"next-drupal": "^1.60"
but it stopped revalidating pages, show previews etc.I'm now trying
"next-drupal": "^2.0.0-beta.0"
and so far following test cases are working fine with it:The text was updated successfully, but these errors were encountered: