wp-graphql-rank-math
wp-graphql-rank-math copied to clipboard
Querying password protected nodeByUri
Description
When querying a password protected entry by nodeByUri NodeWithRankMathSeo causes an internal server error.
Steps to reproduce
query nodes { nodeByUri(uri: "/template-password-protected") { isContentNode ... on NodeWithRankMathSeo { seo { breadcrumbTitle breadcrumbs { isHidden text url } canonicalUrl description focusKeywords robots title } } } }
Results in:
{ "errors": [ { "debugMessage": "WPGraphQL\\RankMath\\Model\\ContentNodeSeo::__construct(): Argument #1 ($post_id) must be of type int, null given, called in C:\\Web\\wordpress-graphql\\app\\public\\wp-content\\plugins\\wp-graphql-rank-math-1\\src\\Type\\WPInterface\\NodeWithSeo.php on line 127", "message": "Internal server error", "extensions": { "category": "internal" }, "locations": [ { "line": 61, "column": 7 } ], "path": [ "nodeByUri", "seo" ] } ], "data": { "nodeByUri": { "isContentNode": true, "seo": null } }, "extensions": { "debug": [], "queryAnalyzer": { "keys": "82677534c6cfb8a22f9766f3f1809f729118349760b6ec2375983682cd52e7c9 graphql:Query operation:nodes list:post list:comment cG9zdDoxMTY4 dXNlcjox", "keysLength": 139, "keysCount": 7, "skippedKeys": "", "skippedKeysSize": 0, "skippedKeysCount": 0, "skippedTypes": [] } } }
Additional context
No response
Plugin Version
0.3.1
WordPress Version
6.6.1
WPGraphQL Version
1.27.2
RankMath SEO Version
1.0.223
Additional enviornmental details
No response
Please confirm that you have searched existing issues in the repo.
- [X] Yes
Please confirm that you have disabled ALL plugins except for RankMath SEO, WPGraphQL, and WPGraphQL for Rank Math
- [X] Yes
- [ ] My issue is with a specific 3rd-party plugin.