renatonascalves / wp-graphql-buddypress

Bringing the power of GraphQL to BuddyPress.
https://wordpress.org/plugins/wp-graphql-buddypress
GNU General Public License v3.0
36 stars 11 forks source link

Fatal Error on install #54

Closed blackge closed 3 years ago

blackge commented 3 years ago

Love what you are doing here and glad to hear you are coming back to it!

I tried installing with BuddyBoss (which has all buddypress core included). I'm getting a fatal error:

`2021/04/03 09:42:14 [error] 25#25: *10090 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Class 'WPGraphQL\Extensions\BuddyPress\TypeRegistry' not found in /www/kinsta/public/insightflowresearchapp/wp-content/plugins/wp-graphql-buddypress-main/wp-graphql-buddypress.php:254 Stack trace:

0 /www/kinsta/public/insightflowresearchapp/wp-content/plugins/wp-graphql-buddypress-main/wp-graphql-buddypress.php(60): WP_GraphQL_BuddyPress->actions()

1 /www/kinsta/public/insightflowresearchapp/wp-content/plugins/wp-graphql-buddypress-main/wp-graphql-buddypress.php(396): WP_GraphQL_BuddyPress::instance()

2 /www/kinsta/public/insightflowresearchapp/wp-includes/class-wp-hook.php(287): wp_graphql_buddypress_init()

3 /www/kinsta/public/insightflowresearchapp/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters()

4 /www/kinsta/public/insightflowresearchapp/wp-includes/plugin.php(484): WP_Hook->do_action()

5 /www/kinsta/public/insightflowresearchapp/wp-content/plugins/wp-graphql/src/WPGraphQL.php(267): do_action()

6 /www/kinsta/public/insightflowr" while reading response header from upstream, client: 172.18.0.1, server: insightflowresearchapp.local, request: "POST /wp-admin/admin-ajax.php?_fs_blog_admin=true HTTP/2.0", upstream: "fastcgi://172.18.0.3:9002", host: "insightflowresearchapp.local", referrer: "https://insightflowresearchapp.local/wp-admin/admin.php?page=graphiql-ide&operationName=MyQuery&query=query%20MyQuery%20%7B%0A%20%20inLibraries%20%7B%0A%20%20%20%20nodes%20%7B%0A%20%20%20%20%20%20inLibraryId%0A%20%20%20%20%20%20name%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D%0A&variables=null"`

Is it compatible with Buddyboss?

renatonascalves commented 3 years ago

You need to run composer install so that the composer autoloader can find the classes.

renatonascalves commented 3 years ago

There is actually bug there that I'll be fixing. It should not bail/fail like that but add a warning to the site. Fix incoming....

renatonascalves commented 3 years ago

@blackge I added a fix so that it doesn't fatal when the classes are not properly loaded. You still need to composer install since you are copying from git.

blackge commented 3 years ago

Brilliant. Thanks!