Bug 26127

Summary: When reporting an Error from the OPAC, the URL does not display
Product: Koha Reporter: Kelly McElligott <kelly>
Component: OPACAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: aleisha, jonathan.druart, lucas
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4461
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.11.00, 20.05.04
Bug Depends on: 4461    
Bug Blocks:    
Attachments: opac
Bug 26127: local_referer should not compare with OPACBaseURL case insensitive
url
Bug 26127: local_referer should not compare with OPACBaseURL case insensitive
Bug 26127: local_referer should not compare with OPACBaseURL case insensitive
Bug 26127: local_referer should not compare with OPACBaseURL case insensitive

Description Kelly McElligott 2020-08-03 11:51:24 UTC
Created attachment 107700 [details]
opac

When a logged in patron "reports a problem", there is a place for the URL of the page the patron is on to be filled in on the line: 'Problem found on page'.

Currently, no matter what page on the OPAC, the Report a Problem is clicked on the , the URL does not display. 

This is what it will display:

Problem found on page: /

From reading the bug 4461, this should display the URL.
Comment 1 Jonathan Druart 2020-08-03 12:05:31 UTC
Hi Kelly, can you confirm you have OPACBaseURL set correctly?
Comment 2 Kelly McElligott 2020-08-03 12:36:54 UTC
Hi Jonathan,
yes, I have the OPACbaseURL set up. It is working and directing staff to OPAC via bib records.
Comment 3 Jonathan Druart 2020-08-03 13:09:51 UTC
Created attachment 107704 [details] [review]
Bug 26127: local_referer should not compare with OPACBaseURL case insensitive

In our test data we have OPACBaseURL that is filled with http://kohadev.myDNSname.org:8080,
but the CGI referer in local_referer is lowercase
We should compare it without case sensitivity
Comment 4 Jonathan Druart 2020-08-03 13:10:41 UTC
Can you test this patch? It's just a guess but I do recreate on koha-testing-docker and it fixes the problem.
Comment 5 Kelly McElligott 2020-08-03 13:45:34 UTC
This is still not working when testing in Sandboxes.

Adding screenshots.
Comment 6 Kelly McElligott 2020-08-03 13:45:58 UTC
Created attachment 107710 [details]
url
Comment 7 Owen Leonard 2020-08-03 14:09:14 UTC
I could see this problem when my OpacBaseURL system preference didn't match my actual OPAC URL. In my case it was because the OpacBaseURL from the sample data doesn't match my test environment. Is the same true of the sandboxes?
Comment 8 Jonathan Druart 2020-08-03 14:36:08 UTC
Sandboxes should have the same case sensitive problem my patch is supposed to fix.
Comment 9 Jonathan Druart 2020-08-04 11:26:59 UTC
Created attachment 107744 [details] [review]
Bug 26127: local_referer should not compare with OPACBaseURL case insensitive

In our test data we have OPACBaseURL that is filled with http://kohadev.myDNSname.org:8080,
but the CGI referer in local_referer is lowercase
We should compare it without case sensitivity

Test plan:
- Use koha-testing-docker
- Notice the value of OPACBaseURL
=> http://kohadev.myDNSname.org:8080
- Use the "reports a problem" feature at the OPAC
- Notice that the "Problem found on page" is correctly filled with the
referer
Comment 10 Jonathan Druart 2020-08-04 11:27:28 UTC
The original problem is also due to an issue in koha-sandboxes-docker, reported at https://github.com/bywatersolutions/koha-sandboxes-docker/issues/37
Comment 11 ByWater Sandboxes 2020-08-12 10:43:49 UTC
Created attachment 108094 [details] [review]
Bug 26127: local_referer should not compare with OPACBaseURL case insensitive

In our test data we have OPACBaseURL that is filled with http://kohadev.myDNSname.org:8080,
but the CGI referer in local_referer is lowercase
We should compare it without case sensitivity

Test plan:
- Use koha-testing-docker
- Notice the value of OPACBaseURL
=> http://kohadev.myDNSname.org:8080
- Use the "reports a problem" feature at the OPAC
- Notice that the "Problem found on page" is correctly filled with the
referer

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Comment 12 Katrin Fischer 2020-08-15 08:09:24 UTC
Created attachment 108317 [details] [review]
Bug 26127: local_referer should not compare with OPACBaseURL case insensitive

In our test data we have OPACBaseURL that is filled with http://kohadev.myDNSname.org:8080,
but the CGI referer in local_referer is lowercase
We should compare it without case sensitivity

Test plan:
- Use koha-testing-docker
- Notice the value of OPACBaseURL
=> http://kohadev.myDNSname.org:8080
- Use the "reports a problem" feature at the OPAC
- Notice that the "Problem found on page" is correctly filled with the
referer

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 13 Jonathan Druart 2020-08-18 15:47:33 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 14 Lucas Gass 2020-09-03 15:27:14 UTC
backported to 20.05.x for 20.05.04
Comment 15 Aleisha Amohia 2020-09-09 04:20:59 UTC
missing dependencies, not backported to 19.11.x
Comment 16 Katrin Fischer 2021-02-06 19:05:27 UTC
*** Bug 27468 has been marked as a duplicate of this bug. ***