Closed iaindurie closed 4 years ago
Path: /wp-json/wp/v2/posts?per_page=100&page=1
The server response was "500 Internal Server Error"
It seems like this is problem in wordpress ACF Rest API plugin and there's nothing that gatsby can do about it.
It just fails to provide response to REST request for posts data. This should be reported in https://github.com/airesvsg/acf-to-rest-api
@iaindurie I had this same issue and I this is how I fixed it.
I installed a clean version of Wordpress. Next, I installed the base Advanced Custom Fields Plugin and lastly I installed the ACF Rest API plugin. I had overlooked the part in the setup guide that this Gatsby Wordpress plugin requires both Wordpress plugins to be installed...
I had exact issue you've described and I believe it was because the the base ACF plugin (not the ACF Rest plugin) wasn't properly loading into my Wordpress installation. I discovered that no matter how many times I tried reinstalling the ACF plugin it refused to appear in the Wordpress admin dashboard... Make sure it appears properly for your installation.
Lastly, I had to go into the Wordpress settings (Dashboard > Settings > Permalinks) and change the permalink structure to Post name for the Gatsby Wordpress Plugin to work properly.
The setup guide states the below. However, this didn't work as described and I had to have the permalinks set to Post name. Once I changed this everything worked!
If you see a page on your site, rather than the JSON output, check if your permalink settings are set to “Plain”.
Hey!
Was this resolved somehow?
I am not using ACF
since I can't get the posts from wordpress.com
hosted site.
I assume the auth
is ok, i am not getting any error on console after gatsby develop
.
(If i provide wrong password in gatsby.config.js
on purpose, then auth
error
is present.
I dont'w want to achieve much, just get the posts
in graphql
, with the following query
from the doc
:
{
allWordpressPost {
edges {
node {
id
slug
title
content
excerpt
date
modified
}
}
}
}
but instead of the result
i am getting the following `error:
{
"errors": [
{
"message": "Cannot query field \"allWordpressPost\" on type \"Query\". Did you mean \"allWordpressAcfOptions\" or \"allWordpressSiteMetadata\"?",
"locations": [
{
"line": 2,
"column": 1
}
]
}
]
}
On my wordpress.com
site there are 2 posts, each of them has tags
and category
, but i cant fetch them.
Any idea what goes wrong here? I have checked everything i could find related this issue, but no solution whatsoever.
Thank you!
I have set acf usage to false as well but I am getting this error
Path: /wp-json/wp/v2/themes?per_page=100&page=1
The server response was "400 Bad Request"
Inner exception message: "Missing parameter(s): status"
Is this resolved? My end, I am still getting the errors: "Cannot query field"
Is there another way to migrate from wordpress to gatsby without trying to do them manually?
Hiya!
This issue has gone quiet. Spooky quiet. 👻
We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!
Thanks for being a part of the Gatsby community! 💪💜
I'm also getting this issue. Using wp.com and no luck.
Hey again!
It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it.
Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m HUMAN_EMOTION_SORRY
. Please feel free to reopen this issue or create a new one if you need anything else.
Thanks again for being part of the Gatsby community!
Getting same error.
In our case, problem was due to a optional field in ACF. We just changed it to required and it started working.
Hope this helps someone.
Hiya!
This issue has gone quiet. Spooky quiet. 👻
We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open! As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!
Thanks for being a part of the Gatsby community! 💪💜
Hey again!
It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it.
Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m HUMAN_EMOTION_SORRY
. Please feel free to reopen this issue or create a new one if you need anything else.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!
Thanks again for being part of the Gatsby community! 💪💜
Description
I have a Wordpress ACF post object which allows me to link to posts from other posts. If I link to the same post more than once (i.e if I link to "Post 1" from "Post 2" as well as "Post 3", using the same acf field), I get the following error when running gatsby:
'GraphQLError: Cannot query field "allWordpressPost" on type "Query". Did you mean "allWordpressTag", "allWordpressWpUsers", "allWordpressWpMedia", "allWordpressWpTypes", or " allWordpressAcfUsers"?
Steps to reproduce
I select a post using ACF post object. Site builds fine. If I then select the same post using the same ACF field on a different page/post, I get the error. If I then remove the post object from other pages and only have it on one page again, site builds fine.
Expected result
I should be able to link to the same post object on multiple pages/posts.
Actual result
Environment
System: OS: Windows 10 CPU: x64 Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz Binaries: Yarn: 1.5.1 - C:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 3.10.10 - C:\Program Files\nodejs\npm.CMD Browsers: Edge: 41.16299.726.0 npmPackages: gatsby: 2.0.14 => 2.0.14 gatsby-image: ^2.0.10 => 2.0.13 gatsby-link: ^2.0.2 => 2.0.4 gatsby-plugin-glamor: ^2.0.5 => 2.0.5 gatsby-plugin-layout: ^1.0.3 => 1.0.3 gatsby-plugin-react-helmet: ^3.0.0 => 3.0.0 gatsby-plugin-robots-txt: ^1.3.0 => 1.3.0 gatsby-plugin-sharp: ^2.0.5 => 2.0.6 gatsby-plugin-typography: ^2.2.0 => 2.2.0 gatsby-source-filesystem: ^2.0.1 => 2.0.3 gatsby-source-wordpress: ^3.0.1 => 3.0.4 gatsby-transformer-sharp: ^2.1.2 => 2.1.3