Bug 27940 - Fix missing email in OpacMaintenance page
Summary: Fix missing email in OpacMaintenance page
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Magnus Enger
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 28086
  Show dependency treegraph
 
Reported: 2021-03-12 10:18 UTC by Magnus Enger
Modified: 2021-12-13 21:10 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes no email address being shown on the OPAC maintenance page for "site administrator" link (when OpacMaintenance is set). Before this the link was showing as an empty "mailto:" instead of the value of KohaAdminEmailAddress
Version(s) released in:
21.05.00,20.11.05,20.05.11
Circulation function:


Attachments
Bug 27940 - Fix missing email in OpacMaintenance page (2.06 KB, patch)
2021-03-12 10:31 UTC, Magnus Enger
Details | Diff | Splinter Review
Bug 27940: Fix missing email in OpacMaintenance page (2.11 KB, patch)
2021-03-16 16:37 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 27940: Fix missing email in OpacMaintenance page (2.17 KB, patch)
2021-03-25 14:34 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Magnus Enger 2021-03-12 10:18:44 UTC
To reproduce:

KohaAdminEmailAddress = Some valid email address
OpacMaintenance = Show

OPAC/cgi-bin/koha/maintenance.pl shows this text:

Koha online catalog is offline for system maintenance. We'll be back soon! If you have any questions, please contact the site administrator. 

"site administrator" is a link, but it only links to "mailto:", the actual email address from KohaAdminEmailAddress is missing. 

I think the problem is here:

<p>The [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog is offline for system maintenance. We'll be back soon! If you have any questions, please contact the <a href="mailto:[% KohaAdminEmailAddress | uri %]">site administrator</a></p>

Specifically, [% KohaAdminEmailAddress | uri %] does not actually get the value from KohaAdminEmailAddress. 

Patch coming!
Comment 1 Magnus Enger 2021-03-12 10:31:18 UTC
Created attachment 118184 [details] [review]
Bug 27940 - Fix missing email in OpacMaintenance page

To reproduce:

KohaAdminEmailAddress = Some valid email address
OpacMaintenance = Show

OPAC/cgi-bin/koha/maintenance.pl shows this text:

"Koha online catalog is offline for system maintenance. We'll be back
soon! If you have any questions, please contact the site administrator."

"site administrator" is a link, but it only links to "mailto:", the
actual email address from KohaAdminEmailAddress is missing.

To test:
- Apply the patch
- Reload the maintenance page
- Click on the "site administrator" link and verify it contains the
  address from KohaAdminEmailAddress
Comment 2 Owen Leonard 2021-03-16 16:37:12 UTC
Created attachment 118337 [details] [review]
Bug 27940: Fix missing email in OpacMaintenance page

To reproduce:

KohaAdminEmailAddress = Some valid email address
OpacMaintenance = Show

OPAC/cgi-bin/koha/maintenance.pl shows this text:

"Koha online catalog is offline for system maintenance. We'll be back
soon! If you have any questions, please contact the site administrator."

"site administrator" is a link, but it only links to "mailto:", the
actual email address from KohaAdminEmailAddress is missing.

To test:
- Apply the patch
- Reload the maintenance page
- Click on the "site administrator" link and verify it contains the
  address from KohaAdminEmailAddress

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 3 Martin Renvoize (ashimema) 2021-03-25 14:34:52 UTC
Created attachment 118812 [details] [review]
Bug 27940: Fix missing email in OpacMaintenance page

To reproduce:

KohaAdminEmailAddress = Some valid email address
OpacMaintenance = Show

OPAC/cgi-bin/koha/maintenance.pl shows this text:

"Koha online catalog is offline for system maintenance. We'll be back
soon! If you have any questions, please contact the site administrator."

"site administrator" is a link, but it only links to "mailto:", the
actual email address from KohaAdminEmailAddress is missing.

To test:
- Apply the patch
- Reload the maintenance page
- Click on the "site administrator" link and verify it contains the
  address from KohaAdminEmailAddress

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 4 Martin Renvoize (ashimema) 2021-03-25 14:35:10 UTC
Good catch, Passing QA
Comment 5 Jonathan Druart 2021-04-01 16:54:54 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 6 Katrin Fischer 2021-04-02 15:02:20 UTC
I'd like to open a new bug here - could we agree to display the address from  ReplytoDefault when set instead of KohaAdminEmailAdress?
In some setups the KohaAdminEmailAdress nees to be set to noreply (same known issue as always with some mail servers being very strict about possible spam)
Comment 7 Martin Renvoize (ashimema) 2021-04-03 06:05:43 UTC
Good call Katrin.
Comment 8 Katrin Fischer 2021-04-04 19:32:55 UTC
(In reply to Martin Renvoize from comment #7)
> Good call Katrin.

I filed bug 28086 :)
Comment 9 Fridolin Somers 2021-04-15 10:22:43 UTC
Pushed to 20.11.x for 20.11.05
Comment 10 Andrew Fuerste-Henry 2021-04-24 16:13:45 UTC
Pushed to 20.05.x for 20.05.11
Comment 11 Victor Grousset/tuxayo 2021-04-24 17:13:58 UTC
Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.