Skip to content

languages.detect setting removes query and params from redirected url #7603

@JuKra00

Description

@JuKra00

Description

When activating the option languages.detect, Kirby does correctly redirect the user to the detected language slug, but does remove any params from the redirected url. I think this is due to the way the language redirect is performed in kirby/src/Cms/LanguageRoutes.php

Expected behavior
When the user with e.g. german language request opens the url my-page.com/?myquery=param the automatic redirect should push the user to my-page.com/de?myquery=param

To reproduce

  1. Install starterkit
  2. Set "languages" => true, "languages.detect" => true
  3. Add two languages, e.g. en.php and de.php
  4. Set browser to request german language
  5. Open the frontpage with a query parameter attached.

Your setup

Kirby 4 / Kirby 5

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions