-
Notifications
You must be signed in to change notification settings - Fork 267
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
TransUnitRepository::getAllDomainByLocale problem #423
Comments
Same error. |
Have a look at #388 (comment), it solved our issue |
As I said, I solved the issue deleting orphan entry from lexik_trans_unit, but I'm not sure it is a "real" solution or just a workaround.
The missing translation is saved and became an orphan lexik_trans_unit without locale and because The question is: the code shoud exclude orphans or not? I think "missing translation" should not be an "halting error", just think to a deploy CI that crasches because some translation is missing. If I would to avoid that an untraslated text to arrive in production: |
@web-fu thanks for the clear reproduction steps. |
@web-fu I tried to reproduce the issue with the steps you provided. Maybe I'm missing something, but I can't force an error. I tried it with master and SF 7.03. Maybe I can't reproduce it, because the locale column cannot be NULL. So I can't update it to contain a NULL value... Let me know if I can close this or you think it is still a big issue and you can help me solve it, maybe by providing a sample database. |
@bartmcleod what is the oldest supported version? I can check if the bug is still occurring or it's solved |
@web-fu I don't know actually, if there is an "official" policy for that. It would make sense to support it for the oldest supported Symfony version (supported by Symfony itself). We have branches for each version when needed. I see that 6.4 is their LTS version and 7.2.3 is current stable version. It should work well for those two in my opinion. See https://symfony.com/releases |
I was trying to refresh the cache via console and I received this error:
Argument 3 passed to Symfony\Bundle\FrameworkBundle\Translation\Translator::addResource() must be of the type string, null given, called in vendor/lexik/translation-bundle/Translation/Translator.php on line 44
After many attempts and some debug, I discovered the problem is caused by this query:
If the
locale
column contains anynull
value the error is triggered.I don't know if the problem is the leftJoin (maybe should be a normal join) or addResource signature (maybe should accept also null values).
For now I removed the invalid translation_unit rows that caused the problem.
The text was updated successfully, but these errors were encountered: