code4romania / code4romania/website-factory

Default language is being forced to English

Open
#657 0 comments 0 reactions 1 assignee Claimed by @overeha View on GitHub
bug :bug: Languages
Dominant language
PHP
Stars
26
Forks
18
Avg merge
1m
Merged PRs (30d)
14

Description

**Describe the bug**

When opening a page from a WF instance without any language selection, the site redirects to the `/en` page regardless of the default page. The only prerequisite is having a site with two languages, one English.

**To Reproduce**

Steps to reproduce the behavior:
1. Create a Website Factory instance with English and another language
2. Set the default language to the other language
3. Open the site without having a language code in the URL
4. The site redirects to the `/en` version of that page

**Expected behavior**

The site should redirect to the default language code of the site.

**Screenshots**

https://github.com/code4romania/website-factory/assets/2820084/1138cf12-6333-41e9-a458-c4df5ef60a89

**Additional context**

This issue also appears in development when starting the instance with the `./vendor/bin/sail npm run dev` command.
> `http://localhost:8080/` ends up as `http://localhost:8080/en/en/en` after a long wait time and then goes to `404`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.