nextjs-wordpress-starter icon indicating copy to clipboard operation
nextjs-wordpress-starter copied to clipboard

Preview in New Tab for CPT is linked to wrong URL.

Open johnrobertmcc opened this issue 2 years ago • 0 comments

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 image 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:

  1. Create CPT
  2. Draft a post
  3. Click on preview -> Preview in New Tab
  4. 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 image

johnrobertmcc avatar Mar 01 '22 18:03 johnrobertmcc