changing language requires deleting of 'hl' cookie #3224

Closed
craigh opened this Issue Nov 27, 2016 · 16 comments

Projects

None yet

3 participants

@craigh
Member
craigh commented Nov 27, 2016
Q A
Zikula Version 1.4.x
PHP Version 5.6

Expected behavior

immediate change of language on the site?

Actual behavior

nothing appears to change - but in reality the routes become localized based on the past cookie value. Deleting the cookie and then returning to home route seems to force the site to change to new language value.

Steps to reproduce

Install more than one locale. Attempt to switch between them using General Settings > localization settings > Default language to use for this site

@craigh craigh added this to the 1.4.5 milestone Nov 27, 2016
@craigh
Member
craigh commented Nov 28, 2016

/cc @rallek

@craigh
Member
craigh commented Nov 28, 2016

refs #1985

@rallek
Contributor
rallek commented Nov 28, 2016

I do not understand :-(

Do I have to delete a cookie? Where, How and which one?

@rallek
Contributor
rallek commented Nov 28, 2016

With ci build 152 I made the install with German language pack. As known some phrases are not translated but most phrases are in German. The site language was set to German. Switching back to english the language switched immediately to english (as expected). Switching to German again it tooks a while until German is back. This happend while I made a new setting for time zone. After this change the site was immediately in German.

Trying around a bit more leads to the following observation:

  • Site is in English and all things are correctly translated
  • next you switch to German and save -> translation of strings are incorrect
  • stay in localisation settings and save once more without changing anything -> translation is changed to German

Is that cookie relevant?

@craigh
Member
craigh commented Nov 28, 2016

probably. find the cookie named hl ("home language") and delete it after changing the language. you should see the change immediately after that (plus reload).

@rallek
Contributor
rallek commented Nov 28, 2016

But this is a bug than. That behavior is new. How that will work with the possibility to choose the language by the user?

@craigh
Member
craigh commented Nov 28, 2016

I'm guessing this hasn't worked (or worked well) since 1.4.0, so sure, it is a bug - but it is one we've been dealing with for more than a year. There are several bugs which are still outstanding. It won't prevent a release. That is why this is scheduled for 1.4.5

@Guite Guite added the Bug label Nov 29, 2016
@rallek
Contributor
rallek commented Nov 30, 2016

Until 1.4.2 It has worked like it should. I do have two live sites, one with 1.4.1 and one with 1.4.2. By upgrading my 1.4.1 site into 1.4.3 the bug is occuring. So the bug is not that old. Might be we can fix it more easy with this information.

@rallek
Contributor
rallek commented Nov 30, 2016 edited

Language change in the users account is also not possible. But i do need exactly this function for the site I prommissed a good friend long time ago. To postpone this to 1.4.5 is really hard for me (and my friend)

@craigh
Member
craigh commented Nov 30, 2016

It is difficult to explain, but the bug has existed before. The reason you didn't see it before and you see it now is that in previous versions the core was not fully transitioned to the new (symfony-based) translation component. You were using the old system - which worked because it worked in 1.3.x. Now the core is (nearly) fully transitioned and therefore it no longer works as you expect.

I don't see this getting fixed before 1.4.5. I'm sorry for you (and your friend).

@rallek
Contributor
rallek commented Dec 3, 2016

Do I have to expact any issues due to this if I am working with a german site and upgrade this one from 1.4.3 to 1.4.4? Do I have to teach all my users they have to delete a cookie? That would be a nightmare because I do have already a site up and running with 1.4.3.

@rallek
Contributor
rallek commented Dec 11, 2016

Currently I do have the issue, even if I delete the cookie somehow the new cookie is set with the old language again. I do have to change the cookie itself from de to en to make the switch happening.

Observed in 1.4.4

@rallek rallek referenced this issue in cmfcmf/MediaModule Dec 12, 2016
Open

problem with language #90

@Guite Guite modified the milestone: 1.4.5, 1.4.6 Dec 29, 2016
@rallek
Contributor
rallek commented Dec 30, 2016

In 1.4.5 I am not able to login again due to language issues. See slack for details.

@rallek
Contributor
rallek commented Dec 30, 2016

see my language settings:
grafik

@rallek
Contributor
rallek commented Dec 31, 2016

This one is still painfull. The deleting of the cookie is no option. I want to ask you to fix this asap after 1.4.5 is released.

@craigh craigh closed this Jan 24, 2017
@craigh
Member
craigh commented Jan 24, 2017

fixed in #3396

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment