AxeWP / wp-graphql-rank-math

Add GraphQL support for RankMath SEO
GNU General Public License v3.0
50 stars 7 forks source link

Querying password protected nodeByUri #108

Closed MonPetitUd closed 3 weeks ago

MonPetitUd commented 1 month ago

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.

Please confirm that you have disabled ALL plugins except for RankMath SEO, WPGraphQL, and WPGraphQL for Rank Math

justlevine commented 3 weeks ago

Thanks for flagging this @MonPetitUd - its been patched in #109 with a release coming soon 🤞