This site uses cookies. By continuing to browse the site, you agree to our use of cookies. Find out more about cookies.
Skip to main content
Metadecidim's official logo
  • English Triar la llengua Elegir el idioma Choose language
    • Català
    • Castellano
Sign Up Sign In
  • Home
  • Processes
  • Assemblies
  • Initiatives
  • Consultations
  • Conferences
  • Help

Report a Bug

#BugReportDecidim Let's test Decidim and report bugs together

  • The process
  • I found a Bug!
chevron-left Back to list

Error homepage of internal links with locale as a parameter

Avatar: Isaac Massot Isaac Massot
28/01/2019 09:57  
Accepted

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

  • Filter results for category: 0.16.x 0.16.x

This proposal has been accepted because:

This incidence has been solved. Closed #4798 via #4809.

List of Endorsements

Avatar: Oliver Valls Oliver Valls
Avatar: Ivan Vergés Ivan Vergés verified-badge
Endorsements count2
Error homepage of internal links with locale as a parameter Comments 8

Reference: MDC-PROP-2019-01-14207
Version number 1 (of 1) see other versions
Check fingerprint

Fingerprint

The piece of text below is a shortened, hashed representation of this content. It's useful to ensure the content hasn't been tampered with, as a single modification would result in a totally different value.

Value: f10b19a92814a53bdca0ef2cb7cdc34f5a85093bf9eb844138d206d3838d0c64

Source: {"body":{"ca":"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.\r\n\r\n2- 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.\r\n\r\n3- We have found it at https://decidim.barcelonaenergia.cat/ with Decidim v0.16.0"},"title":{"ca":"Error homepage of internal links with locale as a parameter"}}

This fingerprint is calculated using a SHA256 hashing algorithm. In order to replicate it yourself, you can use an MD5 calculator online and copy-paste the source data.

Share:

link-intact Share link

Share link:

Please paste this code in your page:

<script src="https://meta.decidim.org/processes/bug-report/f/210/proposals/14207/embed.js"></script>
<noscript><iframe src="https://meta.decidim.org/processes/bug-report/f/210/proposals/14207/embed.html" frameborder="0" scrolling="vertical"></iframe></noscript>

Report inappropriate content

Is this content inappropriate?

Reason

Comment details

Order by:
  • Older
    • Best rated
    • Recent
    • Older
    • Most discussed
You are seeing a single comment

View all comments

Conversation with Ivan Vergés
Avatar: Ivan Vergés Ivan Vergés verified-badge
28/01/2019 11:24
  • Get link Get link

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.

Avatar: Isaac Massot Isaac Massot
28/01/2019 13:23
  • Get link Get link

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"

Avatar: Isaac Massot Isaac Massot
28/01/2019 13:26
  • Get link Get link

Sorry, /ca/processes/bug-report/f/210/proposals/14207 instead of /processes/bug-report/f/210/proposals/14207?locale=ca

Avatar: Ivan Vergés Ivan Vergés verified-badge
28/01/2019 13:35
  • Get link Get link

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.

Avatar: Oliver Valls Oliver Valls
28/01/2019 14:10
  • Get link Get link

I would store the locale in the session. Refactoring urls will break all current SEO and what is worst, will break all incoming links.

Avatar: Isaac Massot Isaac Massot
28/01/2019 14:49
  • Get link Get link

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

Loading comments ...

  • Terms and conditions of use
  • About the community
  • Download Open Data files
  • Metadecidim at Twitter Twitter
  • Metadecidim at Instagram Instagram
  • Metadecidim at YouTube YouTube
  • Metadecidim at GitHub GitHub
Creative Commons License Website made with free software.
Decidim Logo

Confirm

OK Cancel

Please sign in

decidim Sign in with Decidim Barcelona
Or

Sign up

Forgot your password?