next-drupal
next-drupal copied to clipboard
Handling node page updates?
I'm quite new to this so I'm probably doing something wrong as I can't get the production site to fetch node updates. The preview mode works just fine and shows the updates, but when I visit the actual url in a browser window it just shows the old version. I'm using the basic starter so is there some setting I need to change in order to get it to fetch the updated node or do I have to rebuild the project every time some text is changed?
@iamfredrik did you implement on-demand revalidation?
We have a guide here: https://next-drupal.org/guides/on-demand-revalidation
Thanks, I didn't have the Next Extras module installed and configured. However, is it possible to add a wildcard to the paths setting or do I have to define every path that needs to update separately? I tried adding /* but it didn't work.
Unfortunately no. Next.js on-demand ISR does not have support for wildcards.
There are a few other ways you can handle dynamic content across pages. Can you tell us more what you're trying to revalidate?
PS: We're looking into a solution for revalidating multiple pages in next-drupal.
Let's say I add a new page with a menu link, then the link won't show up on every page unless I revalidate them all. Without revalidation the link is only visible on the newly created page. Same thing if the link is already on every page and I edit the link, then the change only shows on the edited page. Is there a solution for this?
If you have menu links that are updated often, you can implement dynamic menus.
I added an example here: https://github.com/shadcn/next-drupal-examples/tree/main/example-dynamic-menus
The menu items will be fetched on the first page hit only, then cached for subsequent navigation.
If you have menu links that are updated often, you can implement dynamic menus.
I added an example here: https://github.com/shadcn/next-drupal-examples/tree/main/example-dynamic-menus
The menu items will be fetched on the first page hit only, then cached for subsequent navigation.
Thank you.