wpengine / wp-graphql-content-blocks

Plugin that extends WPGraphQL to support querying (Gutenberg) Blocks as data
https://faustjs.org/docs/gutenberg/wp-graphql-content-blocks
GNU General Public License v2.0
107 stars 14 forks source link

Getting 500 error when using this plugin with WPGraphQL #178

Closed Abdullah-J01 closed 9 months ago

Abdullah-J01 commented 9 months ago

I just downloaded this plugin from github (version 2.0.0) As soon as I activate this plugin, I cannot open my graphQL IDE in wordpress dashboard It is giving 500 error in console: image

Have anybody faced similar issue? Or any help on how I can resolve this

Basically my project is using "acf_register_block" to register custom blocks and then using ACF in them, I need to expose those blocks with data in the graphQL.

Abdullah-J01 commented 9 months ago

image

theodesp commented 9 months ago

Hey @Abdullah-J01 can you send me the queries are you using for this? You need to disable the plugin and check it without.

It might be a failed GraphQL query.

Abdullah-J01 commented 9 months ago

Hi @theodesp , I am having this error when trying to open the WPGraphQL IDE (The query composer). It shows loading and I get this error in the console. I haven't used a query with this plugin enabled yet.

theodesp commented 9 months ago

@Abdullah-J01 the IDE might be loading a saved query though, so when you enable this plugin it will try to re-use the old one. What other WPGraphQL plugins are you using? I might be able to check if they break.

cherrygot-personal commented 9 months ago

Maybe the debug.log entries can tell what's going wrong. Can you pass the last few lines by enabling the WP_DEBUG_LOG in wp-config.php?

mindctrl commented 9 months ago

@Abdullah-J01 which zip did you download exactly? Does it include the vendor folder?

Abdullah-J01 commented 9 months ago

@theodesp - I tried clearing out the query before activating plugin, however it did not help. I had disbaled all other plugins related to graphQL except WPGraphQL

Abdullah-J01 commented 9 months ago

@cherrygot-personal - I will check the debug logs and share

Abdullah-J01 commented 9 months ago

@mindctrl - I downloaded the zip folder from this git repo, however I do not see a vendor folder

mindctrl commented 9 months ago

@Abdullah-J01 that's likely the problem. If you download from the repo root or the tags view, it won't have the vendor folder. If you download the zip from the releases view, it will contain the vendor folder. https://github.com/wpengine/wp-graphql-content-blocks/releases

Note you want the zip file named wp-graphql-content-blocks.zip and not the ones with "source code" in the name.

Abdullah-J01 commented 9 months ago

Thank you so much @mindctrl and everyone else for such quick help. I will definitely try this and share my feedback

mindctrl commented 9 months ago

Thanks @Abdullah-J01. Let us know what you find. I'm going to convert this to a discussion. If you still have issues let us know and we'll investigate.

mindctrl commented 9 months ago

Update: forgot we don't have Discussions enabled on this repo. Going to close instead. Feel free to re-open if you're still experiencing issues.