-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[gatsby-source-wordpress] ACF not working when there actually is ACF data #2417
Comments
Does the using-wordpress example site work for you? Can you grep through |
@KyleAMathews the acf data IS in |
Hmmm but the schema isn't being generated correctly then? Just to double-check, you're refreshing graphiql when you restart |
Correct the schema is not being generated correctly. Yes and just to be sure I deleted .cache and ran develop again to rebuild .cache. The acf field is correct again in
results in
And that is the page that has the correct acf data in |
@KyleAMathews is there anything else I can try on this? |
Are you on gatsby-source-wordpress v2? Did you verify that the using-wordpress site works? |
I have the same issue,, and for me using-wordpress works, while using my own wp install it does not. |
This should be fixed by @chrisgeary92 in #2471! The issue turned out to be that if you had a post without acf, the API returns Try out gatsby-source-wordpress@2.0.21 and see if things are working for ya! |
@KyleAMathews Can confirm this fixed my issue thank you very much. Sorry never got back to you from your last reply been away from work. |
@garytokyo great! Glad it's working. Credit goes to @chrisgeary92 though as he debugged the issue and wrote the PR :-) |
I am having an issue whereby if there are no ACF fields attached to Posts or Pages then the
acf
field is available to use in graphiql. See screenshot:When I attach a test field group to Posts the acf field is no longer available and will error saying you cannot use that field on the type wordpress__POST (same for posts or pages):
I am using ACF Pro (latest) and I have latest acf to rest plugin and latest versions of gatsby and gatsby-source-wordpress. ACF pro was working fine in older version of gatsby and wordpress source plugin when you had to do:
that query no longer seems to do anything though even though the docs still say this is how to do it.
The text was updated successfully, but these errors were encountered: