wp-graphql / wp-graphql-acf

WPGraphQL for Advanced Custom Fields
https://wpgraphql.com/acf
626 stars 123 forks source link

Error when edit fieldGroup - Locations doesn't appear #298

Closed mattiaefesto closed 11 months ago

mattiaefesto commented 3 years ago

Hello, I'm trying to install this plugin on a DigitalOcean App. I've installed ACF Pro, ACF Extended, and WP GraphQL. Without WP GraphQL ACF the plugins work fine, but when I activate the plugin, in the edit page of the fieldGroup I get this error:

Fatal error: Uncaught TypeError: WPGraphQL\Data\DataSource::format_group_name(): Argument #1 ($group) must be of type string, null given, called in /workspace/web/app/plugins/wp-graphql/src/Data/DataSource.php on line 437 and defined in /workspace/web/app/plugins/wp-graphql/src/Data/DataSource.php:385 Stack trace: #0 /workspace/web/app/plugins/wp-graphql/src/Data/DataSource.php(437): WPGraphQL\Data\DataSource::format_group_name() #1 /workspace/web/app/plugins/wp-graphql/src/Mutation/UpdateSettings.php(98): WPGraphQL\Data\DataSource::get_allowed_settings_by_group() #2 /workspace/web/app/plugins/wp-graphql/src/Mutation/UpdateSettings.php(26): WPGraphQL\Mutation\UpdateSettings::get_output_fields() #3 /workspace/web/app/plugins/wp-graphql/src/Registry/TypeRegistry.php(363): WPGraphQL\Mutation\UpdateSettings::register_mutation() #4 /workspace/web/wp/wp-includes/class-wp-hook.php(303): WPGraphQL\Registry\TypeRegistry->init_type_registry() #5 /workspace/web/wp/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters() #6 /workspace/web/wp/wp-includes/plugin.php(470): WP_Hook->do_action() #7 /workspace/web/app/plugins/wp-graphql/src/Registry/TypeRegistry.php(230): do_action() #8 /workspace/web/app/plugins/wp-graphql/src/Registry/SchemaRegistry.php(37): WPGraphQL\Registry\TypeRegistry->init() #9 /workspace/web/app/plugins/wp-graphql/src/WPGraphQL.php(601): WPGraphQL\Registry\SchemaRegistry->get_schema() #10 /workspace/web/app/plugins/wp-graphql/src/Request.php(151): WPGraphQL::get_schema() #11 /workspace/web/app/plugins/wp-graphql/access-functions.php(67): WPGraphQL\Request->__construct() #12 /workspace/web/app/plugins/wp-graphql-acf/src/class-config.php(1330): graphql() #13 /workspace/web/app/plugins/wp-graphql-acf/src/class-acfsettings.php(144): WPGraphQL\ACF\Config::get_all_graphql_types() #14 /workspace/web/wp/wp-admin/includes/template.php(1395): WPGraphQL\ACF\ACF_Settings->display_metabox() #15 /workspace/web/wp/wp-admin/edit-form-advanced.php(711): do_meta_boxes() #16 /workspace/web/wp/wp-admin/post-new.php(75): require('...') #17 {main} thrown in /workspace/web/app/plugins/wp-graphql/src/Data/DataSource.php on line 385

And the Locations rules list doesn't appear.

Reading the code, it seems that in the get_allowed_settings_by_group() function in DataSource.php line 423 the registered settings are empty. But if I deactivate WP GraphQL ACF, it all works normally. However, if I import an ACF with WP GraphQL ACF activated, I can add the data (only) to the posts, and in the GraphQL IDE I can see the data I've inserted.

Because it's a DigitalOcean App, I've no access to the files, but I can connect to the DB.

The setup is:

Any help would be appreciated. Thanks \m

mattiaefesto commented 3 years ago

I've found the problem. Is the plugin Media Cloud https://wordpress.org/plugins/ilab-media-tools/

Does anyone that uses this plugin have this problem?

jasonbahl commented 11 months ago

Closing this as it appears to have been an issue with another plugin