Bug 31175

Summary: OPAC Logout should return you to where you were (unless that's a restricted page)
Product: Koha Reporter: Martin Renvoize (ashimema) <martin.renvoize>
Component: OPACAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: dcook
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34164
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Martin Renvoize (ashimema) 2022-07-18 13:39:17 UTC
The OPAC logout appears to always take you back to opac-main.

To test
1) Perform a search
2) Go to the details of a search results
3) Logout
4) Note, you are no longer on the defail page for the record you had searched for.
Comment 1 Katrin Fischer 2022-07-18 18:00:08 UTC
Tbh it feels right to me that a logout 'resets' for the next user. I think usually you'd only log out when you intend to leave. For the patron account pages, we'd also need to redirect to the login page probably.
Comment 2 David Cook 2023-06-30 03:57:57 UTC
I think there's a number of instances where we should be returned to the page that initiated a login/logout. 

Although Katrin makes a good point too.
Comment 3 David Cook 2023-06-30 04:05:50 UTC
I think one of the problems with the current logout is actually that it leaves you on a page that performs a logout if you visit it.

If you bookmark that page or refer back to it in some way, you'll be doing a logout every time you visit it. We should probably be redirecting to a URL after logout that would not perform a logout.
Comment 4 David Cook 2023-11-16 02:23:00 UTC
I think that Bug 34164 illustrates how "/cgi-bin/koha/opac-main.pl?logout.x=1" can be a problem. 

I wonder if there's anything that relies on ""/cgi-bin/koha/opac-main.pl?logout.x=1" currently though...