I added src/pages/404.js
It is loading correctly on developing mode, but on build version, css not loading ( see my 404 page )
Hi @hesamkaveh!
Sorry to hear you're running into an issue. To help us best begin debugging the underlying cause, it is incredibly helpful if you're able to create a minimal reproduction. This is a simplified example of the issue that makes it clear and obvious what the issue is and how we can begin to debug it.
If you're up for it, we'd very much appreciate if you could provide a minimal reproduction and we'll be able to take another look.
Thanks for using Gatsby! 馃挏
Hi @hesamkaveh , I see that you are using an older version of Gatsby. Can you update all your packages to see if the problem is fixed? If not, please share a reproducible example.
Ahh @DSchau beat me to it 馃榾
Hi @DSchau and @krismorf and thank you for reply,
While creating minimal reproduction of my website, i understood that this bug because of Gatsby version,
But when update gatsby@next(2.1.20-alpha.0) to @latest(2.1.22) on my main code and try to build it, i got these errors:
error GraphQL Error Field "id" is not defined by type wordpressPostConnectionCategoriesQueryList_2.
file: /home/hesam/project/doing/hesamkaveh.com ui/src/templates/category.js
1 |
2 | query($id: String!) {
3 | wordpressCategory(id:{eq:$id}) {
4 | id
5 | name
6 | description
7 | }
8 |
> 9 | allWordpressPost(filter: {categories: {id: {eq: $id}}}) {
| ^
10 | edges {
11 | node {
12 | title
13 | excerpt
14 | content
15 | slug
16 | categories {
17 | name
18 | description
19 | id
You can see my category.js on github .It works before update,
My right 404 error page: http://hesamkaveh.com/404
Wrong 404 page that not load css: http://hesamkaveh.com/every-page-that-not-found
@hesamkaveh would you be able to cross-post that to #12272
Generally, by latest, we mean non-alpha latest (e.g. latest stable). You can use that with npm i gatsby
@hesamkaveh it seems like your most recent error was caused by using a too-recent version of Gatsby.
Is there still an error here?
@hesamkaveh it seems like your most recent error was caused by using a too-recent version of Gatsby.
Is there still an error here?
Yes It is not resolved and errors still here in too-recent version.
Because of that I still using old version
I think You need to adjust your queries that use categories filter to something like
allWordpressPost(filter: {categories: { elemMatch: { id: {eq: $id}}}}) {
check graphiql for exact syntax - above might not work
I think You need to adjust your queries that use categories filter to something like
allWordpressPost(filter: {categories: { elemMatch: { id: {eq: $id}}}}) {check graphiql for exact syntax - above might not work
Oh i searched for syntax and i find a syntax that work correctly with new gatsby!
My Previous syntax:
allWordpressPost(filter: {tags: {id: {eq: $id}}}) {
And my new syntax:
allWordpressPost(filter: {tags: { elemMatch:{id: {eq: $id}}}}) {
thanks:)
Most helpful comment
@hesamkaveh would you be able to cross-post that to #12272
Generally, by latest, we mean non-alpha latest (e.g. latest stable). You can use that with
npm i gatsby