I posted an issue to GH Bug: Parallel intercepted route in Next.js · Issue #11587 · vercel/vercel · GitHub but got redirected here.
I have a Next.js application with a parallel intercepted route. I am catching a certain route and rendering a modal over the current route.
When deployed to Vercel there is an issue when opening that route. The code is working perfectly fine locally in both, development and production mode.
Here is the error I am getting:
Application error: a client-side exception has occurred (see the browser console for more information).
I made a repository with an example: GitHub - Cussone/vercel-nextjs-routing-bug
And here is the deployment: https://vercel-nextjs-routing-bug.vercel.app/en
I found out that on Vercel deployment the page param for the [collection]
path gets logged as %5Bcollection%5D
inside the modal, which is most likely causing the error. [collection]
is the folder name, it should be logging the appropriate part of the path from the URL and not the literal folder name.
If anything else is needed from my side, I will gladly help. Hopefully, I was clear enough.