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

Redirecting to a different locale pathname does not pass search params #568

Closed
BrendonSled opened this issue Oct 15, 2023 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@BrendonSled
Copy link
Contributor

Description

When the middleware redirects a pathname to a localized version the search params are removed.

This has been tested with the latest RC 4

Mandatory reproduction URL (CodeSandbox or GitHub repository)

https://codesandbox.io/p/sandbox/next-intl-bug-template-app-forked-f22qnx

Reproduction description

Steps to reproduce:

  1. Open reproduction
  2. Click on about. Notice the search params are working, now click the link with a different local
  3. See error: When the middleware redirects the pathname to the localized version the search param is removed

Expected behaviour

Search params should stay intact when redirecting

@BrendonSled BrendonSled added bug Something isn't working unconfirmed Needs triage. labels Oct 15, 2023
@amannn
Copy link
Owner

amannn commented Oct 16, 2023

Good point, thanks for the report!

Would you be interested in adding a fix for this?

The relevant code is:

The RC is based on the feat/next-13-rsc branch.

Let me know if you're interested!

@BrendonSled
Copy link
Contributor Author

Sure thing! I created the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants