Report a Bug
#BugReportDecidim Let's test Decidim and report bugs together
Error homepage of internal links with locale as a parameter
1- When you are not registered or logged in as a user, and you click on any button (participate, sign up, start, participate, activate, etc.) on the homepage, they redirect you to the correct page, but with the default locale of the application, although you have selected another language in the locale switcher of head.
2- I hope that, if I have a locale selected in the switcher, when I click on the link, it will redirect me to the page with the locale selected.
3- We have found it at https://decidim.barcelonaenergia.cat/ with Decidim v0.16.0
List of Endorsements
Report inappropriate content
Is this content inappropriate?
8 comments
This is not happening when the user is logged in.
Conversation with Ivan Vergés
Is there any reason to not use sessions to store the locale language once chosen on the switcher?
Not storing this value will cause this problem to any internal link posted anywhere in the platform.
Another way would be that the locale will be part of the url.
Something like this: " Error homepage of internal links with locale as a parameter"
Sorry, /ca/processes/bug-report/f/210/proposals/14207 instead of /processes/bug-report/f/210/proposals/14207?locale=ca
Yes, in fact this approach is similar to the GET parameter currently used (the system has to rewrite any link anywhere to match the locale language). However it's better for SEO indexing.
But if backwards compatibility should be taken into account, maybe a fallback system could be in place that would use the session stored value in case no GET or not URL parameter is present.
I think that one problem of relying in the system rewriting all the links in the platform is that prone to errors (as we are seeing right know). Specially for links posted by the end user in text boxes.
I would store the locale in the session. Refactoring urls will break all current SEO and what is worst, will break all incoming links.
I've made a pre PR to discuss.
Check https://github.com/decidim/decidim/pull/4802
This happened because the routes url_helpers was not included correctly in each cell
I just realized that this is happening to wherever cells are used...
Add your comment
Sign in with your account or sign up to add your comment.
Loading comments ...