@@ -, +, @@ about page UpdateNotForLoanStatusOnCheckin OpacHiddenItems BibtexExportAdditionalFields RisExportAdditionalFields UpdateItemWhenLostFromHoldList MarcFieldsToOrder MarcItemFieldsToOrder --- about.pl | 21 +++++++++++++++++++++ koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 10 ++++++++-- 2 files changed, 29 insertions(+), 2 deletions(-) --- a/about.pl +++ a/about.pl @@ -32,6 +32,7 @@ use XML::Simple; use Config; use Search::Elasticsearch; use Try::Tiny; +use YAML; use C4::Output; use C4::Auth; @@ -378,6 +379,26 @@ if ( C4::Context->preference('WebBasedSelfCheck') ); } +# Test YAML system preferences +# FIXME: This is list of current YAML formatted prefs, should by type of preference +my @yaml_prefs = ( + "UpdateNotForLoanStatusOnCheckin", + "OpacHiddenItems", + "BibtexExportAdditionalFields", + "RisExportAdditionalFields", + "UpdateItemWhenLostFromHoldList", + "MarcFieldsToOrder", + "MarcItemFieldsToOrder" +); +my @bad_yaml_prefs; +foreach my $syspref (@yaml_prefs) { + eval { YAML::Load( C4::Context->preference( $syspref ) ); }; + if ($@) { + push @bad_yaml_prefs, $syspref; + } +} +$template->param( 'bad_yaml_prefs' => \@bad_yaml_prefs ) if @bad_yaml_prefs; + { my $dbh = C4::Context->dbh; my $patrons = $dbh->selectall_arrayref( --- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt @@ -183,7 +183,7 @@
- [% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatron || warnPrefAnonymousPatron_PatronDoesNotExist || warnNoActiveCurrency || QueryParserError || warnIsRootUser || xml_config_warnings.size || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || has_ai_issues || oauth2_missing_deps %] + [% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatron || warnPrefAnonymousPatron_PatronDoesNotExist || warnNoActiveCurrency || QueryParserError || warnIsRootUser || xml_config_warnings.size || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || has_ai_issues || oauth2_missing_deps || bad_yaml_prefs %] [% IF (warnIsRootUser) %]

Warning regarding current user

You are logged in as the database administrative user. This is not recommended because some parts of Koha will not function as expected when using this account.

@@ -228,7 +228,7 @@
[% END %] - [% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatron || warnPrefAnonymousPatron_PatronDoesNotExist || warnNoActiveCurrency || QueryParserError || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || oauth2_missing_deps %] + [% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatron || warnPrefAnonymousPatron_PatronDoesNotExist || warnNoActiveCurrency || QueryParserError || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || oauth2_missing_deps || bad_yaml_prefs %]

Warnings regarding the system configuration

@@ -300,6 +300,11 @@ System preference 'RESTOAuth2ClientCredentials' is set, but the required Net::OAuth2::AuthorizationServer dependency is missing. The feature is disabled. [% END %] + [% IF bad_yaml_prefs %] + + [% END %]
Preferences and parameters
Warning + Some YAML formatted system preferences have bad format: [% bad_yaml_prefs.join(', ') | html %] +
[% END %] @@ -371,6 +376,7 @@ [% END %] [% END %] + [% ELSE %]

No warnings.

[% END %] --