Closed marcusforsberg closed 1 year ago
Same issue here:
Query:
user(idType: SLUG, id: $slug) {
id
slug
name
avatar {
url
}
seo {
canonical
fullHead
metaDesc
}
}
}
Errors:
{
"debugMessage": "Call to a member function get_head() on bool",
"message": "Internal server error",
"extensions": {
"category": "internal"
},
"locations": [
{
"line": 9,
"column": 5
}
],
"path": [
"user",
"seo"
],
Running a query such as:
This triggers an internal server error. Debug mode shows this specific error message:
Call to a member function get_head() on bool
The cause seems to be in
get_post_type_graphql_fields()
:for_author()
will returnfalse
if the user has no post since it is considered to not be indexable by Yoast.Can we add a check so that
get_head()
is not run iffor_author()
returns false? 😊