gatsby-plugin-react-i18next icon indicating copy to clipboard operation
gatsby-plugin-react-i18next copied to clipboard

language prefix and matchPath doesn't work togather?

Open Stewiey opened this issue 4 years ago • 2 comments

hey, first of all i'd like to mention that I'm not using graphql at all in my project.

I'm creating my pages with createPages (in gatsby-node.js), everything works just fine beside the page that needs extra prop from the slug,

here how i create it

createPages({
    path: '/item',
    matchPath: '/item/:itemId',
    component: path.resolve('./src/pages/ShowItem.js'),
    context: {},
});

it works only for the default language, for other languages like es for example http://localhost:8000/es/item/some-item-id it would lead to page NOT FOUND, I tried so many things like matchPath: '/:lang?/item/:itemId', - this way it will redirect to the same path with extra language prefix (in addition to the existing one), I tried using pages in the option with this matchPath but it didn't change anything.

I tried even, turning off the redirect option then the default language shows Gatsby.js development 404 page but the rest works ...

not sure what i'm missing here but i can't figure it out, thanks!

Stewiey avatar Oct 30 '20 14:10 Stewiey

Facing same issue :disappointed: Instead of createPages API I am using navigate(item/${id}) and hence no result.

sanju-developer avatar Nov 03 '20 04:11 sanju-developer

Related to #69

ozburo avatar May 18 '21 14:05 ozburo