Closed MonPetitUd closed 5 months ago
Thanks for taking the time to report this @MonPetitUd !
Would you be able to:
GRAPHQL_DEBUG
constant), rerun the query, and share the debugMessage
that (hopefully) gets generated?I'm working on a fix now, but that information will help me confirm I'm on the right path 🤞
(Additional context - the fatal error itself seems to be a PHP error and solvable by setting a default value to SeoModel:$databaseId
. The larger underlying issue that ContentType
objects don't have a global archive context, due to the lack of an archive interface, so even with the fatal fixed the data itself is bad).
No worries @justlevine.
PHP 7.4
Below is the response with GraphQL debugging on:
{
"errors": [
{
"debugMessage": "Typed property WPGraphQL\\RankMath\\Model\\Seo::$database_id must not be accessed before initialization",
"message": "Internal server error",
"extensions": {
"category": "internal"
},
"locations": [
{
"line": 9,
"column": 5
}
],
"path": [
"nodeByUri",
"seo",
"breadcrumbs"
]
}
],
"data": {
"nodeByUri": {
"__typename": "ContentType",
"seo": {
"__typename": "RankMathPostTypeSeo",
"title": "Blog - Website Name",
"description": "Blog page SEO description",
"breadcrumbs": null
}
}
},
"extensions": {
"debug": [],
"queryAnalyzer": {
"keys": "f99ddc3f7fbf19aeff4b9a5da13138928f5f3ea80617099f0537512a628a3a6d graphql:Query operation:rankMathNodeByUri cG9zdF90eXBlOnBvc3Q=",
"keysLength": 127,
"keysCount": 4,
"skippedKeys": "",
"skippedKeysSize": 0,
"skippedKeysCount": 0,
"skippedTypes": []
}
}
}
Hey @MonPetitUd
(I'm putting it through the final paces myself, at which point I'll merge and start the release process).
(This is closed automatically on merge, if you're still running into trouble, comment here and I'll repoen)
Description
When "ContentType" is returned by a nodeByUri query (for example on the page for posts e.g. "/blog" or woocommerce shop page e.g. "/shop") including "breadcrumbs" under "NodeWithRankMathSeo" produces an internal server error. The data is still returned with the breadcrumbs being null. I suspect breadcrumbs are not actually available on this type?
Steps to reproduce
Example query:
Result:
Additional context
No response
Plugin Version
0.1.1
WordPress Version
6.4.3
WPGraphQL Version
1.22.1
RankMath SEO Version
1.0.216
Additional enviornmental details
WooGraph 0.19.0 WooCommerce 8.6.1
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