Hotfix/#8 Replace custom search endpoint with WP 5.0 search endpoint #9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #8
It looks like the issue might be coming from this commit: 605d490
With this chunk of code specifically: 605d490#diff-79e5a3319d8cd2b1598acd07d412f4a0R419
Basically, we're asking for an error message to be returned if there are no results found. If we remove this, the plugin still works as expected with returning the "No results found." text below the search input while also no longer showing a 500 error.
In addition, I've also updated our route to use
/wp/v2/rather than our/wds-react-post-search/v1/and everything continues to work smoothly.If y'all could give this a test on your locals and let me know if you run into anything, that'd be great!
With my testing: