Bug 33048 - Empty email link on error page when OPAC login not allowed
Summary: Empty email link on error page when OPAC login not allowed
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: David Cook
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-23 00:38 UTC by David Cook
Modified: 2023-12-28 20:43 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00,22.11.04,22.05.11,21.11.19


Attachments
Bug 33048: Fix email link on error page when opac login not allowed (1.70 KB, patch)
2023-02-23 00:45 UTC, David Cook
Details | Diff | Splinter Review
Bug 33048: Fix email link on error page when opac login not allowed (1.77 KB, patch)
2023-02-23 11:50 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 33048: Fix email link on error page when opac login not allowed (1.82 KB, patch)
2023-02-24 20:52 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Cook 2023-02-23 00:38:27 UTC
Steps to reproduce:
1. Go to http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=opacuserlogin
2. Set to "Don't allow"
3. In an incognito window, go to http://localhost:8080/cgi-bin/koha/opac-reportproblem.pl
4. Note that the "mailto" link for "Email" is empty.
Comment 1 David Cook 2023-02-23 00:45:40 UTC
Created attachment 147186 [details] [review]
Bug 33048: Fix email link on error page when opac login not allowed

This change replaces a non-existent variable with the
KohaAdminEmailAddress syspref.

Test plan:
0. Apply the patch
1. Go to http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=opacuserlogin
2. Set to "Don't allow"
3. In an incognito window, go to http://localhost:8080/cgi-bin/koha/opac-reportproblem.pl
4. Note that the "mailto" link for "Email" has the value from KohaAdminEmailAddress syspref
Comment 2 PTFS Europe Sandboxes 2023-02-23 11:50:54 UTC
Created attachment 147227 [details] [review]
Bug 33048: Fix email link on error page when opac login not allowed

This change replaces a non-existent variable with the
KohaAdminEmailAddress syspref.

Test plan:
0. Apply the patch
1. Go to http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=opacuserlogin
2. Set to "Don't allow"
3. In an incognito window, go to http://localhost:8080/cgi-bin/koha/opac-reportproblem.pl
4. Note that the "mailto" link for "Email" has the value from KohaAdminEmailAddress syspref

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Comment 3 Sally 2023-02-23 11:56:46 UTC
Works as described.  Thanks!

The only thing I noticed was that it isn't decoded, so on mouseover it shows the email address as %40 instead of @.

I'm not convinced it matters as all of the functionality is there.  Clicking on the link launches a new email to the correct recipient.  If you don't use a default mail client, copying/pasting the link also works.
Comment 4 Nick Clemens 2023-02-24 20:52:04 UTC
Created attachment 147401 [details] [review]
Bug 33048: Fix email link on error page when opac login not allowed

This change replaces a non-existent variable with the
KohaAdminEmailAddress syspref.

Test plan:
0. Apply the patch
1. Go to http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=opacuserlogin
2. Set to "Don't allow"
3. In an incognito window, go to http://localhost:8080/cgi-bin/koha/opac-reportproblem.pl
4. Note that the "mailto" link for "Email" has the value from KohaAdminEmailAddress syspref

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 5 Tomás Cohen Arazi 2023-02-27 14:42:51 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 6 Matt Blenkinsop 2023-03-01 09:35:12 UTC
Nice work everyone!

Pushed to stable for 22.11.x
Comment 7 Lucas Gass 2023-03-10 14:14:31 UTC
Backported to 22.05.x for upcoming 22.05.11
Comment 8 Arthur Suzuki 2023-03-29 12:57:21 UTC
applied to 21.11 for 21.11.19
Comment 9 wainuiwitikapark 2023-04-27 05:34:40 UTC
Not backported to 21.05.x