Bug 27736

Summary: When an unauthenticated user goes to report a problem, the problempage URL will be lost
Product: Koha Reporter: Eric Phetteplace <ephetteplace>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: CLOSED WORKSFORME QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Eric Phetteplace 2021-02-19 21:34:38 UTC
When an unauthenticated user goes to report a problem, they're first prompted to login, then they have to click the "report a problem" link a second time and now the value of the $referer variable is going to be opac-user.pl and not the original page.

Steps to recreate:

- enter a KohaAdminEmailAddress and set OPACReportProblem to Allow
- as an unauthenticated user visit any page other than your account (opac-user.pl) e.g. search results (opac-search.pl) or a bib detail (opac-detail.pl)
- select the "report a problem" link at the bottom
- you're interrupted by the user login process, complete your authentication
- you land on the user account page opac-user.pl
- if you select "report a problem" again now, the "problempage" value on the form will be some form of "/cgi-bin/koha/opac-user.pl..." and not the original page you attempted to report

There is a work around—users can return to where they originally had the problem and click "report a problem" there, but that's not intuitive nor user friendly.
Comment 1 Katrin Fischer 2023-07-01 17:08:27 UTC
This works for me on master when the OPACBaseURL is correctly set.
Comment 2 Eric Phetteplace 2023-12-18 20:52:10 UTC
FWIW we have OPACBaseURL set and this still does not work, but I believe it is due to CAS authentication. The problem page is lost after passing through CAS authentication, whose end result is always the opac-user.pl page no matter where you started from.