faustjs
faustjs copied to clipboard
Bug: Preview button redirect incorrect url on Netlify
Hi, currently i'm trying to implement the preview feature with Wordpress Faustjs and Nextjs using this document as reference https://faustjs.org/guide/how-to-setup-post-and-page-previews. It worked on localhost and other hosting platform (Vercel, Atlas) but on Netlify it's only redirect to "/" endpoint (it should be "/preview")
Applicable Versions
- "@faustwp/blocks": "^2.0.0",
- "@faustwp/cli": "1.0.1",
- "@faustwp/core": "1.0.3"
Steps To Reproduce
- Change faust frontend URL on your setting with your Netlify app URL
- Update content on Wordpress draft page that not the front page (ex: test-page)
- Click preview button and open in new tab
The current behavior
It's redirect to the wrong URL netlify-site.netlify.app instead of netlify-site.netlify.app/preview (Sorry i can't provide my current site as it is my client websites)
The expected behavior
It should redirect to preview url with /preview endpoint which will render the right preview page
I'd appreciate it if someone from the community or the maintainers could provide some guidance on how I can enable and handle the preview mode in my Next.js v13 application.
Best regards,
@NguyenQuocThinh13 can you provide a minimal repo for reproducing this problem? Thank you!