Browse Source

Bug 12561: Add warning on about page

If a default xslt file has been removed or if the one filled in one of
the syspref does not exist.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
21.11.x
Jonathan Druart 3 years ago
parent
commit
817f19945b
  1. 25
      about.pl
  2. 7
      koha-tmpl/intranet-tmpl/prog/en/modules/about.tt

25
about.pl

@ -319,6 +319,31 @@ if ( C4::Context->preference('ILLModule') ) {
$template->param( warnILLConfiguration => $warnILLConfiguration );
}
{
# XSLT sysprefs
my @xslt_prefs = qw(
OPACXSLTDetailsDisplay
OPACXSLTListsDisplay
OPACXSLTResultsDisplay
XSLTDetailsDisplay
XSLTListsDisplay
XSLTResultsDisplay
);
my @warnXSLT;
for my $p ( @xslt_prefs ) {
my $xsl_filename = C4::XSLT::get_xsl_filename( $p );
next if -e $xsl_filename;
push @warnXSLT,
{
syspref => $p,
value => C4::Context->preference("$p"),
filename => $xsl_filename
};
}
$template->param( warnXSLT => \@warnXSLT ) if @warnXSLT;
}
if ( C4::Context->preference('SearchEngine') eq 'Elasticsearch' ) {
# Check ES configuration health and runtime status

7
koha-tmpl/intranet-tmpl/prog/en/modules/about.tt

@ -299,7 +299,7 @@
Contact your system administrator.
[% END %]
[% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatronOPACPrivacy || warnPrefAnonymousPatronAnonSuggestions || warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist || warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist || warnPrefKohaAdminEmailAddress || warnPrefOpacHiddenItems || invalid_yesno.count || warnNoActiveCurrency || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || oauth2_missing_deps || bad_yaml_prefs || warnIssuingRules || config_bcrypt_settings_no_set || warnHiddenBiblionumbers.size %]
[% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatronOPACPrivacy || warnPrefAnonymousPatronAnonSuggestions || warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist || warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist || warnPrefKohaAdminEmailAddress || warnPrefOpacHiddenItems || invalid_yesno.count || warnNoActiveCurrency || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || warnXSLT || oauth2_missing_deps || bad_yaml_prefs || warnIssuingRules || config_bcrypt_settings_no_set || warnHiddenBiblionumbers.size %]
<h2>Warnings regarding the system configuration</h2>
<table>
<caption>Preferences and parameters</caption>
@ -327,6 +327,11 @@
[% IF warnPrefOpacHiddenItems %]
<tr><th scope="row"><strong>Warning</strong> </th><td>System preference 'OpacHiddenItems' generates a warning and will produce unexpected behaviors: [% warnPrefOpacHiddenItems | html %]</th></tr>
[% END %]
[% IF warnXSLT %]
[% FOR p IN warnXSLT %]
<tr><th scope="row"><strong>Warning</strong> </th><td>System preference '[% p.syspref | html %]' is '[% p.value | html %]', but the file '[% p.filename | html %]' does not exist.</th></tr>
[% END %]
[% END %]
[% IF invalid_yesno.count %]
[% FOR p IN invalid_yesno %]
<tr><th scope="row"><strong>Warning</strong> </th><td>System preference '[% p.variable | html %]' must be '0' or '1', but is [% IF p.value.defined %]'[% p.value | html%]'[% ELSE %]NULL[% END %].</td></tr>

Loading…
Cancel
Save