Bug 28146 - E-mail address used on error pages should respect ReplytoDefault
Summary: E-mail address used on error pages should respect ReplytoDefault
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Marcel de Rooy
QA Contact: Martin Renvoize (ashimema)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-14 12:29 UTC by Jonathan Druart
Modified: 2025-10-09 21:01 UTC (History)
2 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
25.11.00
Circulation function:


Attachments
Bug 28146: Respect ReplytoDefault in error pages (10.00 KB, patch)
2025-10-06 12:24 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 28146: Respect ReplytoDefault in error pages (10.06 KB, patch)
2025-10-09 12:24 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 Jonathan Druart 2021-04-14 12:29:55 UTC
"admin" is sent from C4::Output::output_error, we should use Koha.Preference('KohaAdminEmailAddress') from the template instead

koha-tmpl/intranet-tmpl/prog/en/includes/prefs-menu.inc:        [% IF ( admin ) %]

koha-tmpl/intranet-tmpl/prog/en/modules/errors/errorpage.tt:            <li>To report a broken link or any other issue, please contact the Koha Administrator. <a href="mailto:[% admin | uri %]">Send email</a></li>

koha-tmpl/opac-tmpl/bootstrap/en/modules/errors/errorpage.tt:                                    <a href="mailto:[% admin | uri %]">Send email</a>.</li>                                                          

koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt:                            <li>To report this error, you can email the Koha Administrator.<a href="mailto:[% admin | uri %]">Email</a></li>                


C4/Output.pm:        admin => $admin,
errors/400.pl:    admin => $admin,
errors/401.pl:    admin => $admin,
errors/402.pl:    admin => $admin,
errors/403.pl:    admin => $admin,
errors/404.pl:    admin => $admin,
errors/500.pl:    admin => $admin,
opac/errors/400.pl:    admin => $admin,
opac/errors/401.pl:    admin => $admin,
opac/errors/402.pl:    admin => $admin,
opac/errors/403.pl:    admin => $admin,
opac/errors/404.pl:    admin => $admin,
opac/errors/500.pl:    admin => $admin,
Comment 1 Katrin Fischer 2021-04-17 18:15:21 UTC
Please also prefer ReplyToDefault here with a fallback to KohaAdminEmailAddress.
Comment 2 Katrin Fischer 2023-07-01 08:11:29 UTC
We now have:

my $admin = C4::Context->preference('KohaAdminEmailAddress');

But: In some cases this will be a noreply-address. We should be using inbound_email_address or at least prefer ReplyToDefault.
Comment 3 Marcel de Rooy 2025-10-06 12:24:01 UTC
Created attachment 187463 [details] [review]
Bug 28146: Respect ReplytoDefault in error pages

Test plan:
Fill ReplytoDefault.
Check an error page on OPAC and intranet.
Verify that the send mail link refers to that email address.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 4 Marcel de Rooy 2025-10-06 12:25:47 UTC
Trivial patch. Self signoff
Comment 5 Martin Renvoize (ashimema) 2025-10-09 12:24:56 UTC
Created attachment 187654 [details] [review]
Bug 28146: Respect ReplytoDefault in error pages

Test plan:
Fill ReplytoDefault.
Check an error page on OPAC and intranet.
Verify that the send mail link refers to that email address.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Comment 6 Lucas Gass (lukeg) 2025-10-09 21:01:03 UTC
Nice work everyone!

Pushed to main for 25.11