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

[2.9.x] Client only paths refresh stopped working #14742

Closed
valse opened this issue Jun 12, 2019 · 8 comments
Closed

[2.9.x] Client only paths refresh stopped working #14742

valse opened this issue Jun 12, 2019 · 8 comments
Labels
type: bug An issue or pull request relating to a bug in Gatsby

Comments

@valse
Copy link
Contributor

valse commented Jun 12, 2019

Hi,
from the 2.9.0 version if I try to navigate directly to one of client page path like "/product/123/", I'm redirected to the base "/product/" url: the same if I refresh the browser from the "/product/123/" page.

@valse valse changed the title [2.9.0] Client only paths stopped working [2.9.0] Client only paths refresh stopped working Jun 13, 2019
@valse
Copy link
Contributor Author

valse commented Jun 13, 2019

I made a demo site here:

https://csb-ith0t.netlify.com/test/product/

navigate to one of single product page and refresh it... you'll redirect to the previous list page.

The issue happen in production build only!

@valse valse changed the title [2.9.0] Client only paths refresh stopped working [2.9.x] Client only paths refresh stopped working Jun 14, 2019
@valse
Copy link
Contributor Author

valse commented Jun 14, 2019

I try to update to the latest 2.9.3 version but it's the same: I think is due to the new page-data.json that, for the client only routes, set a wrong path on it:

{"componentChunkName":"component---src-pages-test-product-js","path":"/test/product/","webpackCompilationHash":"45138510e055c8cebbcf","result":{"pageContext":{"matchPath":"/test/product/*","isCreatedByStatefulCreatePages":true}}}

@wardpeet
Copy link
Contributor

@valse can we reproduce it with https://github.com/gatsbyjs/gatsby/tree/master/examples/client-only-paths?

Thanks for filling this bug

@valse
Copy link
Contributor Author

valse commented Jun 14, 2019

Hi @wardpeet... I reproduced it in this codesandbox and published to netlify (I added the gatsby-plugin-netlify to support the client redirect on Netlify, and the gatsby-plugin-create-client-paths one instead of using the gatsby-node config for the client routing).

If you refresh one of next pages, it will be redirected to the first one.

@lukasa1993
Copy link

any workaround on this ?

@wardpeet
Copy link
Contributor

Sorry for the inconvenience. The only workaround is to lock gatsby on version 2.8.8.

@Moocar
Copy link
Contributor

Moocar commented Jun 21, 2019

Hopefully addressed by #15010

@m-allanson m-allanson added the type: bug An issue or pull request relating to a bug in Gatsby label Jun 21, 2019
@sidharthachatterjee
Copy link
Contributor

Fixed and published in gatsby@2.10.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

No branches or pull requests

6 participants