Skip to content
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

Fix cookies with session lifetime #18819

Closed
Starker3 opened this issue Feb 18, 2022 · 3 comments · Fixed by #18820
Closed

Fix cookies with session lifetime #18819

Starker3 opened this issue Feb 18, 2022 · 3 comments · Fixed by #18820
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc. Regression Indicates a feature used to work in a certain way but it no longer does even though it should.
Milestone

Comments

@Starker3
Copy link
Contributor

The language change option for the anonymous user doesn't seem to be working at the moment (Tested in 4.6.1 and 4.7.1)

It shows the drop down menu and you can select a different language, but it just kicks it back to English every time.
image

This happens on any instance that has Anonymous user access enabled including demo.matomo.cloud and demo2.matomo.org

@Starker3 Starker3 added the Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. label Feb 18, 2022
@sgiehl
Copy link
Member

sgiehl commented Feb 18, 2022

This one is a regression from #18179, as the session language cookie is always set with an expire of 01-Jan-1970 00:00:00 UTC

@sgiehl sgiehl added Bug For errors / faults / flaws / inconsistencies etc. and removed Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. labels Feb 18, 2022
@sgiehl sgiehl added this to the 4.8.0 milestone Feb 18, 2022
@sgiehl sgiehl self-assigned this Feb 18, 2022
@tsteur tsteur added the Regression Indicates a feature used to work in a certain way but it no longer does even though it should. label Feb 20, 2022
@Findus23
Copy link
Member

Findus23 commented Feb 20, 2022

Guess I should have checked the issues first as I noticed that my plugin (https://plugins.matomo.org/LanguageToogle) was broken and I rediscovered that issue. (In the plugin I set the users language with LanguagesManager::setLanguageForSession($lang); for the session if they use the buttons to quickly change it)

And indeed with #18820 everything works again as it should, thanks for that.

Findus23 added a commit to Findus23/plugin-LanguageToogle that referenced this issue Feb 20, 2022
@Findus23
Copy link
Member

As this breaks the plugin complete and I assume it will be a while until 3.8.0 is released, I published a new version of the plugin which as a workaround sets the language in the DB (which also works as long as the language is not set in the session):
Findus23/plugin-LanguageToogle@0.3.3...0.3.5

@justinvelluppillai justinvelluppillai changed the title Anonymous user unable to change language Fix cookies with session lifetime Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Regression Indicates a feature used to work in a certain way but it no longer does even though it should.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants