nextjs-wordpress-starter
nextjs-wordpress-starter copied to clipboard
Preview in New Tab for CPT is linked to wrong URL.
Thanks for taking the time to file a bug report! Please fill out this form as completely as possible.
If you leave out sections there is a high likelihood it will be moved to our GitHub Discussions.
Describe the bug
This 'Preview in new tab' should reroute to
api/preview
route. It redirects directly to /
with a query string attached, sending user to the homepage.
To Reproduce Steps to reproduce the behavior:
- Create CPT
- Draft a post
- Click on
preview
->Preview in New Tab
- URL reroutes to
/
with query?post_type=restaurant&p=535&preview=true
attached
Expected behavior
This button should reroute to api/preview
, with query string attached.
Desktop (please complete the following information):
- OS: Ubuntu 20
- Browser: Chrome, Chromium, Brave
Additional context
From CPT -> All Posts, preview is linked correctly to api/preview
in quick edit options