Skip to content
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

gatsbyjs 404page problem #12279

Closed
hesamkaveh opened this issue Mar 4, 2019 · 8 comments
Closed

gatsbyjs 404page problem #12279

hesamkaveh opened this issue Mar 4, 2019 · 8 comments

Comments

@hesamkaveh
Copy link
Contributor

hesamkaveh commented Mar 4, 2019

I added src/pages/404.js
It is loading correctly on developing mode, but on build version, css not loading ( see my 404 page )

@DSchau
Copy link
Contributor

DSchau commented Mar 4, 2019

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! 💜

@DSchau DSchau added the status: needs reproduction This issue needs a simplified reproduction of the bug for further troubleshooting. label Mar 4, 2019
@krismorf
Copy link
Contributor

krismorf commented Mar 4, 2019

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 😀

@hesamkaveh
Copy link
Contributor Author

hesamkaveh commented Mar 5, 2019

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

@DSchau
Copy link
Contributor

DSchau commented Mar 5, 2019

@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

@DSchau
Copy link
Contributor

DSchau commented Mar 7, 2019

@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
Copy link
Contributor Author

hesamkaveh commented Mar 14, 2019

@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

@pieh
Copy link
Contributor

pieh commented Mar 14, 2019

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

@hesamkaveh
Copy link
Contributor Author

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:)

@hesamkaveh hesamkaveh removed the status: needs reproduction This issue needs a simplified reproduction of the bug for further troubleshooting. label Mar 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants