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.
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!
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}}}
@valse can we reproduce it with https://github.com/gatsbyjs/gatsby/tree/master/examples/client-only-paths?
Thanks for filling this bug
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.
any workaround on this ?
Sorry for the inconvenience. The only workaround is to lock gatsby on version 2.8.8.
Hopefully addressed by https://github.com/gatsbyjs/gatsby/pull/15010
Fixed and published in [email protected]
Most helpful comment
Fixed and published in
[email protected]