Closed ablears closed 1 month ago
I've been able to replicate the Invalid "UTF-8" string
error in the bakery command, however the website works correctly when using the built in PHP server.
The white page you're seeing might not be related. Does it appear on every page? Have you checked the browser console for any error? Otherwise, can you double check the logs to get any clues ?
Hi, the white page appears on the /account/settings/profile route if I change my language and save the change. No PHP, userfrosting or console log errors. The env is set to debug.
https://somup.com/cZQIVtmyEL shows the issues.
To confirm:
So looks like three issues... I wasn't able to replicate the white page again. Did you get the same error in a fresh install? Any custom code to the account/setting pages?
I've split the issue in 3 since there's really 3 problem here. Let focus on the white page of death here. The other two issues I can replicate and should be able to fix relatively soon.
Hi, thanks for your help so far.
I did a code comparison between my template at /app/templates/pages/account-settings.html.twig and the one supplied in vendor/userfrosting/theme-adminlte/app/templates/pages/account-settings.html.twig. There were no differences, however deleting /app/templates/pages/account-settings.html.twig fixed the issue.
What I did notice is that when the error triggered (with my template in place), the URL would change to /account/settings/profile.
I've not zeroed in on the exact cause, but it appears to be related to my setup and I don't need to make changes to account-settings.html.twig, so I think we can close this one.
Alright. Let me know if this needs to be reopened.
Affected sprinkle or package
userfrosting/UserFrosting
UserFrosting or package Version
5.1.3
Debug Data
Chat Discussion (optional)
No response
Description
The site only shows in English.
Running
php bakery locale:dictionary
and selecting a language, eg pt_BR, brings back the full dictionary OK.My sprinkle has the language files at /app/locale/pt_BR/*. Running
cat messages.php
shows my translations./app/config/default.php includes
site.locales.available
which containspt_BR' => true
The HTML head tag contains the language code
<html lang="pt_BR" style="height: auto; min-height: 100%;">
The only clue is the output of
php bakery locale:compare -l en_US -r pt_BR
which showsTranslations worked in 4 and 5, but not after upgrading to 5.1
So I added error logging just before the error message to identify the string:
string(59) "�lido. Escolha um nome diferente, ou clique em 'sugestão'."
Searching for that string:
ack 'Escolha um nome diferente' . app/sprinkles/sprinkle-account/app/locale/pt_BR/messages.php 144: 'NOT_AVAILABLE' => 'Usuário <strong>{{user_name}}</strong> não é válido. Escolha um nome diferente, ou clique em \'sugestão\'.',
So the error is coming from
v**á**lido
in the string above.Running a similar comparison using a different language also results in errors, eg
php bakery locale:compare -l en_US -r fr_FR
shows an error forstring(20) "� la page d'accueil."
I'm not sure if the ByteString error is the reason translations are not showing, but at least it's something to work off.
Logging in and changing my user profile language at /account/settings/profile to a non-English language results in a white screen with no errors in either the PHP or userfrosting log files.
Steps To Reproduce
No response