You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What's happening is that instead of the URI getting marked as an error (for not matching the rewrite rules), it falls back to the Home Page. In the OP example, this is the Posts ContentType, but if you explicitly set a page as the Home Page, it will return that instead.
The query args that are passed into our local WP_Query call are different than whats passed to WP::query_posts(). This seems to be due at least in part to our NodeResolver::parse_request() call missing logic that I guess was stripped out as extraneous with the old approach.
There's a compounding factor where querying nodeByUri multiple times in the same request results in stale data in the NodeResolver class properties that also messes with the results. Needs more sleuthing.
Description
When querying for
nodeByUri
and passing a non-existing path as the uri, aContentType
node is returned instead of null.This is happening on the
1.14.0
release branch (and develop, which is yet to be released code) but is NOT happening on the latest release1.13.10
.Steps to reproduce
/posts/%postname%/
ContentType
type (this is a bug as null is the expected response)Additional context
If we follow the same steps to reproduce in version 1.13.10, we get a
null
response as expected:Behavior (still unexpected) changes when you change the values of these settings:
Possibly related: #2260 and corresponding PR: #2261
WPGraphQL Version
1.14.0 (unreleased)
WordPress Version
6.1.1
PHP Version
8.1.9
Additional enviornment details
No response
Please confirm that you have searched existing issues in the repo.
Please confirm that you have disabled ALL plugins except for WPGraphQL.
The text was updated successfully, but these errors were encountered: