-
Notifications
You must be signed in to change notification settings - Fork 76
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
Empty language switcher on 404 page #114
Comments
Any progress on this one? The languages are there when testing the page in symfony 2.6 and higher using this in routing_dev.yml: _errors:
resource: "@TwigBundle/Resources/config/routing/errors.xml"
prefix: /_error and this URL |
@dbu, I discussed this issue with the symfony developers and it appears to be caused by the following:
See symfony/symfony#15451 (comment) . Do youi think it's possible to listen to another event in order to have the locales avaiiable in the error pages? |
hm, not sure if that is possible. if something relies on the work the routing did, things would fail miserably. but it actually could be that it can indeed work. the 404 happens during the routing, so everything we do after that is too late. a first step would be you create a branch of LocaleBundle where you change the priority to a higher value so it happens before routing and see if that works. what does seem wrong is when there are no languages in the switcher. that would mean some of the bootstrap is wrong. what i see from your links is that the current locale might not be properly set. changing the locale on a 404 page seems not that important to me but having the right locale for the error page would be rather important. i hope you can find something or @lunetics can help us here. you could try to build a functional test with a 404 page to test the interaction in a way you can also share with us. |
Thank you for your look at things. Since my time is limited, I'll wait with developing something until @lunetics has written his thoughts. |
I have a custom 404 page which also shows the language switcher. On this page there are no entries in the switcher, is there a setting I'm missing? I would like to be able to translate this page too.
The text was updated successfully, but these errors were encountered: