Open vstrelianyi opened 3 years ago
Hi @vstrelianyi can you post your Custom Field configuration? I'm wondering if you have the Select multiple values?
option enabled.
Hi @ardiewen ! should I check for this option in ACF field configuration?
yes, you can select several options
btw I have found the same issue here in acf graphql plugin repo https://github.com/wp-graphql/wp-graphql-acf/issues/155
Yeah interesting... definitely related to the acf schema filter as mentioned in the other post. However the solve seems to be on this repo. I will see if I can test a potential fix.
That would be great! Thx a lot!
Hi @vstrelianyi, you'll need two PRs to fix the issue:
https://github.com/wp-graphql/wp-graphql-acf/pull/297 on the acf plugin repo
Please note the following:
1) This will only be a temp fix due to significant breaking changes in wp-graphql-acf in v0.6.0
2) You MUST set a "Filter by Post Type" like you have in your screenshot. Failing to do so will cause the default type of your field to become PostObjectUnion
which will cause conflicts with wp-graphql-woocommerce
and consequently throw an error.
Ok. will try that!, thx! so wp-graphql-acf v0.6.0 is on the way?
Hi @vstrelianyi, you'll need two PRs to fix the issue:
568 on this repo wp-graphql/wp-graphql-acf#297 on the acf plugin repo
Please note the following:
- This will only be a temp fix due to significant breaking changes in wp-graphql-acf in v0.6.0
- You MUST set a "Filter by Post Type" like you have in your screenshot. Failing to do so will cause the default type of your field to become
PostObjectUnion
which will cause conflicts withwp-graphql-woocommerce
and consequently throw an error.
I think only https://github.com/wp-graphql/wp-graphql-acf/pull/297 on the acf plugin repo
this edit is needed now thankfully.
@vstrelianyi @CesarBenavides777 @ardiewen @asmartbear Is this still an issue in v0.12.1
?
@kidunot89 Let me get this tested and confirm.
versions: WP 5.8.1 Woo 5.8.0 Graphql 1.6.5 WPGraphQL WooCommerce 0.10.4 Advanced Custom Fields PRO 5.10.2 WPGraphQL for Advanced Custom Fields 0.5.3
Steps: 1) I'm having a CPT - Auctions 2) Auction has an ACF Relationship field with Products 3) when I'm running the following query - I'm receiving an error
QUERY:
ERROR:
QUERY: query GET_AUCTIONS { auctions { nodes { title acf_auctions { auctionProduct { ... on SimpleProduct { id name databaseId commentCount } } } } } }
ERROR: { "errors": [ { "message": "Internal server error", "extensions": { "category": "internal" }, "locations": [ { "line": 6, "column": 9 } ], "path": [ "auctions", "nodes", 1, "acf_auctions", "auctionProduct", 0 ] } ], "data": { "auctions": { "nodes": [ { "title": "Auction 2", "acf_auctions": { "auctionProduct": null } }, { "title": "Auction 1", "acf_auctions": { "auctionProduct": [ null ] } } ] } }, "extensions": { "debug": [ { "type": "DEBUG_LOGS_INACTIVE", "message": "GraphQL Debug logging is not active. To see debug logs, GRAPHQL_DEBUG must be enabled." } ] } }