pristas-peter / wp-graphql-gutenberg

Query gutenberg blocks with wp-graphql
https://wp-graphql-gutenberg.netlify.app
GNU General Public License v3.0
299 stars 62 forks source link

blockJSON is null if a query loop is used #161

Open b00y0h opened 1 year ago

b00y0h commented 1 year ago

If using wp's query inside Gutenberg query loop (CoreQueryBlock?) to display a list of posts or pages, blocks and blocksJSON returns null. Running in graphical returns the below error:

"debugMessage": "Too few arguments to function gutenberg_render_block_core_post_title(), 2 passed in /app/wp-includes/class-wp-block-type.php on line 288 and exactly 3 expected"

and debug log fills with these errors when going to graphiql page inside of WP:

[25-Oct-2022 14:18:56 UTC] PHP Warning: Could not determine type of attribute "templateLock" in "CoreCoverBlockAttributes" in /app/wp-content/plugins/wp-graphql-gutenberg-0.3.11/src/Schema/Types/BlockTypes.php on line 87

[25-Oct-2022 14:18:56 UTC] PHP Warning: Could not determine type of attribute "templateLock" in "CoreCoverBlockDeprecatedV1Attributes" in /app/wp-content/plugins/wp-graphql-gutenberg-0.3.11/src/Schema/Types/BlockTypes.php on line 87

WP: 6.0.2 GraphQL API for WordPress: Version 1.12.0 WP GraphQL Gutenberg: Version 0.3.11