Bug 23201 - Changing languages on the OPAC redirects to opac-main which logs out SCO/SCI users
Summary: Changing languages on the OPAC redirects to opac-main which logs out SCO/SCI ...
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-25 10:54 UTC by Nick Clemens
Modified: 2019-06-28 17:02 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2019-06-25 10:54:33 UTC
When changing languages on the OPAC the SCO user is logged out - this si because we always redirect to opac home when changing.

We should preserve current location when switching.

To recreate:
1 - enable more than 1 language in opaclanugages syspref
2 - enable opaclanguagedisplay syspref
3 - have WebBasedSelfCheck enabled and setup with AutoSelfCheckUser
4 - go to the SCO:
http://localhost:8080/cgi-bin/koha/sco/sco-main.pl
5 - Switch languages
6 - get a log out screen
Comment 1 Katrin Fischer 2019-06-25 18:57:05 UTC
(In reply to Nick Clemens from comment #0)
> When changing languages on the OPAC the SCO user is logged out - this si
> because we always redirect to opac home when changing.
> 
This is not true - if everything is alright, you will stay at the page you are at when changing languages. 

One mistake that can happen here is not setting up the BaseUrls correctly, that will cause a redirect for home.
Comment 2 Katrin Fischer 2019-06-25 19:30:14 UTC
The language switch behaviour is broken in general for me on master with kohadevbox. In OPAC and staff it still works nicely in 18.11 for me. Couldn't test 19.05.
Comment 3 Jonathan Druart 2019-06-26 00:41:29 UTC
Confirmed for SCO.

The patronid parameter is lost and so we are getting the login page.

We could enhance opac-changelanguage and pass additional parameters to keep for the next script. So far it only keeps the GET parameters from the referer, not sure we want to have the patronid in the url when a user log in (/cgi-bin/koha/sco/sco-main.pl?patronid=42).
Comment 4 Jonathan Druart 2019-06-26 00:43:11 UTC
(In reply to Katrin Fischer from comment #2)
> The language switch behaviour is broken in general for me on master with
> kohadevbox. In OPAC and staff it still works nicely in 18.11 for me.
> Couldn't test 19.05.

Ok for me on master at the OPAC. I can login, search, change language => still logged in.
Comment 5 Katrin Fischer 2019-06-26 05:42:42 UTC
Nick, can you confirm this is a more general problem?
Comment 6 Katrin Fischer 2019-06-26 05:48:50 UTC
Jonathan - problem for me was not losing login on master, but always being sent back to the start page. I had localhost:8080 and localhost:8081 in my baseUrls defined. Same happened on OPAC and staff.
Comment 7 Jonathan Druart 2019-06-28 17:02:30 UTC
(In reply to Katrin Fischer from comment #6)
> Jonathan - problem for me was not losing login on master, but always being
> sent back to the start page. I had localhost:8080 and localhost:8081 in my
> baseUrls defined. Same happened on OPAC and staff.

The behavior is correct for me. However I do not use ports.