From b5f3a68512554796f183cb4db857f828e0dee2f8 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Thu, 7 Aug 2025 16:10:36 -0300 Subject: [PATCH] Bug 40608: (follow-up) Add warning in about page Content-Type: text/plain; charset=utf-8 This patch adds a check in about.pl for when `NotifyPasswordChange` is enabled but no notices are present on the system. Signed-off-by: Tomas Cohen Arazi Signed-off-by: Marcel de Rooy --- about.pl | 14 ++++++++++++++ koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 13 +++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/about.pl b/about.pl index 7f8f113425..788ad2f112 100755 --- a/about.pl +++ b/about.pl @@ -49,6 +49,7 @@ use Koha::BiblioFrameworks; use Koha::Biblios; use Koha::Email; use Koha::I18N; +use Koha::Notice::Templates; use Koha::Patron::Categories; use Koha::Patrons; use Koha::Caches; @@ -588,6 +589,19 @@ if ( $tab eq 'sysinfo' ) { $template->param( warnDbRowFormat => C4::Installer->has_non_dynamic_row_format ); } + # NotifyPasswordChange + if ( C4::Context->preference('NotifyPasswordChange') ) { + + $template->param( warnPassChangeNoticeMissing => 1 ) + unless Koha::Notice::Templates->find_effective_template( + { + module => 'members', + code => 'PASSWORD_CHANGE', + message_transport_type => 'email', + } + ); + } + $template->param( prefRequireChoosingExistingAuthority => $prefRequireChoosingExistingAuthority, prefAutoCreateAuthorities => $prefAutoCreateAuthorities, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt index 3cd1bba40b..1fd0a5cc61 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt @@ -328,7 +328,7 @@ [% SET warnMissingCompiledFiles = 1 %] [% END %] [% WRAPPER tab_panel tabname= "sysinfo" bt_active = 1 %] - [% IF weasyprint_missing || warnPrefRequireChoosingExistingAuthority || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatronOPACPrivacy || warnPrefAnonymousPatronAnonSuggestions || warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist || warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist || warnPrefKohaAdminEmailAddress || warnPrefOpacHiddenItems || warnPrefPatronSelfRegistrationDefaultCategory || invalid_yesno.count || warnNoActiveCurrency || warnIsRootUser || xml_config_warnings.size || warnI18nMissing || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || has_ai_issues || oauth2_missing_deps || bad_yaml_prefs || warnRelationships || log4perl_errors || config_bcrypt_settings_no_set || warnHiddenBiblionumbers.size || warnConnectBroker || elasticsearch_has_missing || warnMissingCompiledFiles || warnDbRowFormat %] + [% IF weasyprint_missing || warnPrefRequireChoosingExistingAuthority || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatronOPACPrivacy || warnPrefAnonymousPatronAnonSuggestions || warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist || warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist || warnPrefKohaAdminEmailAddress || warnPrefOpacHiddenItems || warnPrefPatronSelfRegistrationDefaultCategory || invalid_yesno.count || warnNoActiveCurrency || warnIsRootUser || xml_config_warnings.size || warnI18nMissing || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || has_ai_issues || oauth2_missing_deps || bad_yaml_prefs || warnRelationships || log4perl_errors || config_bcrypt_settings_no_set || warnHiddenBiblionumbers.size || warnConnectBroker || elasticsearch_has_missing || warnMissingCompiledFiles || warnDbRowFormat || warnPassChangeNoticeMissing %] [% IF ( warnDbRowFormat ) %]

Database row format incorrect

Database tables with a row format other than 'DYNAMIC': [% warnDbRowFormat | html %]

@@ -473,7 +473,7 @@ Contact your system administrator. [% END # /IF warnConnectBroker %] - [% IF weasyprint_missing || warnPrefRequireChoosingExistingAuthority || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatronOPACPrivacy || warnPrefAnonymousPatronAnonSuggestions || warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist || warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist || warnPrefKohaAdminEmailAddress || warnPrefOpacHiddenItems || warnPrefPatronSelfRegistrationDefaultCategory || invalid_yesno.count || warnNoActiveCurrency || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || warnXSLT || oauth2_missing_deps || bad_yaml_prefs || warnIssuingRules || config_bcrypt_settings_no_set || warnHiddenBiblionumbers.size || warnFastCataloging %] + [% IF weasyprint_missing || warnPrefRequireChoosingExistingAuthority || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatronOPACPrivacy || warnPrefAnonymousPatronAnonSuggestions || warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist || warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist || warnPrefKohaAdminEmailAddress || warnPrefOpacHiddenItems || warnPrefPatronSelfRegistrationDefaultCategory || invalid_yesno.count || warnNoActiveCurrency || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || warnXSLT || oauth2_missing_deps || bad_yaml_prefs || warnIssuingRules || config_bcrypt_settings_no_set || warnHiddenBiblionumbers.size || warnFastCataloging || warnPassChangeNoticeMissing %]

Warnings regarding the system configuration

@@ -592,6 +592,15 @@ [% END %] + [% IF warnPassChangeNoticeMissing %] + + + + + [% END %] [% IF warnILLConfiguration %] [% IF no_ill_backends %] -- 2.39.5
Preferences and parameters
The PO directory has not been found. See the dedicated wiki page for more information.
Warning System preference 'NotifyPasswordChange' is enabled, but the PASSWORD_CHANGE notice template is missing. Password changes will fail. Please create the PASSWORD_CHANGE notice template in + Tools > Notices and slips.