webiny / webiny-js

Open-source serverless enterprise CMS. Includes a headless CMS, page builder, form builder, and file manager. Easy to customize and expand. Deploys to AWS.
https://www.webiny.com
Other
7.29k stars 601 forks source link

Unistalled language as preset when reusing a sub-domain #4090

Open bootstrapdisruptive opened 4 months ago

bootstrapdisruptive commented 4 months ago

Version

v5.39.4

Operating System

Win

Browser

Chrome

What are the steps to reproduce this bug?

What is the expected behavior?

As the locale de-DE is not installed. I'd expect the Admin UI to open with the default language or at least show the language switcher.

What do you see instead?

An empty Webiny. There was no language switcher (probably because there was no second locale installed), but the content accessible via the Cloudfront URL wasn't visible or editable. not even the groups or models.

When I added a random second language in the settings, the admin UI showed the language switcher and revealed, that the interface was set to "De-de" - a locale that wasn't even installed/activated,

Additional information

I assume the browser somehow has a localeStorage or something remembering that the URL webiny. was used in de-de and that the Admin app doesn't react on the case, that this locale isn't available.

Possible solution

IIf the remembered locale is not installed/acitvated, make the admin app switch to the default locale.

Pavel910 commented 4 months ago

@bootstrapdisruptive thanks for the detailed report, and sorry for late reply. This does sound like a localStorage issue. There's nothing else that can affect this behavior, so your guess is correct. We'll have a look at this.