-
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-contentful fails to transform content #3374
Comments
Looks like one of your fields in Contentful starts with 0 which graphql doesn't allow. |
Doesn't seem to be it, I checked the Content Model manually and there is no field id that starts with 0, could it be an asset name? Also is there any way to selectively choose which content types to retrieve? |
Could you add some console.logs to the source plugin where types are being defined to find out where this one is coming from? It could be a bug and would love your help finding the source. |
Here is the culprit, it came from a JSON field data that had an array of objects, the
Added a log to
Which fired the content types. It seems to be fixed now as that data wasn't used as it is anyways. |
@KyleAMathews would this be a bug with my JSON structure or the way the Gatsby Contentful Source is parsing in the data? |
Neither. Sorry for the slow reply and thanks for the investigation! What you found I think is a core bug. Will need time to investigate it. If you or someone wants to do more investigating that'd be great! If you still have it, could you paste the json data you had (if it's sensitive, swap it out for other data -- it's the structure that matters). |
Heres the markup!
|
@Khaledgarbaya any thoughts? |
Ah, it's the same issue as this #2967 (comment) |
hey, @mirshko we can pair on this and try to investigate the problem. |
I sent a pull request for this issue |
I have the same issue using the I have a JSON object field containing: I agree with @Khaledgarbaya that the spread causes the problem. Is going to be a problem if we check if the |
I'm closing this issue. If the problem happens again feel free to open a new issue and link this one or reopen this one and ping me. :) |
Description
The issue is that when importing contentful from my space we get the error
Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/
. However, there is no content with this name, so I'm not sure what is causing this issue.Environment
Gatsby version: v1.9.145
Node.js version: v9.3.0
Operating System: v10.13.2 (17C88)
File contents (if changed):
gatsby-config.js
:Actual result
Expected behavior
Content should be imported and transformed cleanly.
Steps to reproduce
Other less-full spaces are fine, just this space 700+ entires, 1500+ assets, aren't being imported cleanly.
...
The text was updated successfully, but these errors were encountered: