headstartwp icon indicating copy to clipboard operation
headstartwp copied to clipboard

When ServerRelatedPosts fails, queryPosts throws an error

Open sambrodie opened this issue 6 months ago • 0 comments

Describe the bug

In wp-nextjs-app:

Even if the main query is working, the error from the ServerRelatedPosts component will override the output of the main query and display an error.

Can we safely add options: { throwIfNotFound: false } to the queryPosts call in ServerRelatedPosts to suppress this error?

Steps to Reproduce

  1. Create a site with only one post
  2. Visit that post

Screenshots, screen recording, code snippet

https://share.zight.com/kpuv9Pqg

Environment information

No response

WordPress information

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

sambrodie avatar Aug 07 '24 14:08 sambrodie