next-intl icon indicating copy to clipboard operation
next-intl copied to clipboard

Route intercept does not work with generateStaticParams in layout

Open IikkaWinter opened this issue 1 year ago • 2 comments

Description

Route intercept seizes to work once generateStaticParams along with unstable_setRequestLocale are added to [locale]/layout.tsx. The params passed to the route group (modal) does not include locale.

NOTE: this does not manifest when running on local - only in prod mode.

Verifications

  • [X] I've verified that the problem I'm experiencing isn't covered in the docs.
  • [X] I've searched for similar, existing issues on GitHub and Stack Overflow.
  • [X] I've compared my app to a working example to look for differences.

Mandatory reproduction URL

https://github.com/IikkaWinter/nextagram-intl

Reproduction description

Steps to reproduce:

  1. Clone my fork of nextagram-intl example repo
  2. npm run build and npm start to start in prod mode
  3. Open landing page and notice that the prefetched photo server components are responding with 404
  4. Click on the picture and the photo root route is rendered instead of the modal
  5. Observe the console log on server taking note on missing locale in modal params

Expected behaviour

The picture modal should be shown as when running in dev

IikkaWinter avatar Apr 09 '24 15:04 IikkaWinter

Possibly related to https://github.com/amannn/next-intl/issues/255, maybe also https://github.com/amannn/next-intl/issues/663.

amannn avatar Apr 11 '24 16:04 amannn

Any updates on this issue?

tonyabracadabra avatar May 01 '24 10:05 tonyabracadabra

This issue has been automatically closed because there was no recent activity and it was marked as unconfirmed. Note that issues are regularly checked and if they remain in unconfirmed state, they might miss information required to be actionable or are potentially out-of-scope. If you'd like to discuss this topic further, feel free to open a discussion instead.

github-actions[bot] avatar Jun 01 '24 00:06 github-actions[bot]