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

Setting Language to English Breaks Website #344

Closed
TheDeadCPU opened this issue Sep 6, 2018 · 4 comments · Fixed by #650
Closed

Setting Language to English Breaks Website #344

TheDeadCPU opened this issue Sep 6, 2018 · 4 comments · Fixed by #650
Labels

Comments

@TheDeadCPU
Copy link

TheDeadCPU commented Sep 6, 2018

Hi, so after succesfully installing, I opened up the website, and changed the language from German to English, this made the website stop functioning, and throwing a lot of PHP errors.

Here's a imgur gallery with the php errors.
https://imgur.com/a/mUMN4RD

Expected Behavior

Changing language to English should change language to English

Current Behavior

Selecting English breaks the website.

Steps to Reproduce (for bugs)

  1. Start fresh server
  2. On setup page change to english and hit apply.

Your Environment

  • Version used: Latest
  • Operating System and version: Ubuntu Server 18.04
  • Docker Version: 18.06.1-CE
  • Docker Compose Version: 1.22.0
@M4LuZ
Copy link
Collaborator

M4LuZ commented Sep 6, 2018

Looks like your translations are not loaded and it fails to translate the error message that it cannot translate the error message. Ending in a recursive loop of no return.

On setup page change to english and hit apply.

I guess that means you are running a fresh docker installation?

@TheDeadCPU
Copy link
Author

TheDeadCPU commented Sep 6, 2018

I am indeed using a completely fresh docker installation.
The server has been setup virtually, docker-ce installed, and docker-compose.
Then used the steps over at https://lansuite.github.io/lansuite/docs/installation.html

Added "fresh" to the first step to reproduce the issue, to make it more clear that it was a fresh installation.

@M4LuZ
Copy link
Collaborator

M4LuZ commented Sep 6, 2018

As far as I can tell from a first look:
German translations are always loaded
Translation function uses these directly and the DB in any other case
But translations from the DB are not loaded during the setup stage, as the DB connection is not yet configured.

Proposed solution:
Modify translation function to follow three stages:

  • Check if given translaton is loaded
  • Try to load it from the DB
  • Try to load it from the text file if it fails. Try to update DB.
  • Return untranslated text with warning if that also fails.

That should work for all cases, shouldn't it?

What I'm wondering: Why has this never popped up?
It does not look like this ever worked.
Or maybe it has, but we're not aware due to #239

@TheDeadCPU
Copy link
Author

As a workaround, I set the site up using german language, using google translate works well for those that can't work their way around the german.
Afterwards setting the language to english does work. (even though there's quite a lot of stuff not translated, but this can be done manually)

andygrunwald added a commit that referenced this issue Jun 21, 2023
andygrunwald added a commit that referenced this issue Jun 23, 2023
…ation page (#650)

* Fix #344: Switching to English during Installation breaks the Installation page

Fix #344
Related #415

* Fix usage of wrong variable name

* EnvIsConfigured: Renamed File according function

---------

Co-authored-by: M4LuZ <MaLuZ@gmx.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants