View | Details | Raw Unified | Return to bug 25172
Collapse All | Expand All

(-)a/about.pl (+20 lines)
Lines 25-30 use Modern::Perl; Link Here
25
use CGI qw ( -utf8 );
25
use CGI qw ( -utf8 );
26
use DateTime::TimeZone;
26
use DateTime::TimeZone;
27
use File::Spec;
27
use File::Spec;
28
use File::Slurp;
28
use List::MoreUtils qw/ any /;
29
use List::MoreUtils qw/ any /;
29
use LWP::Simple;
30
use LWP::Simple;
30
use Module::Load::Conditional qw(can_load);
31
use Module::Load::Conditional qw(can_load);
Lines 48-53 use Koha::Caches; Link Here
48
use Koha::Config::SysPrefs;
49
use Koha::Config::SysPrefs;
49
use Koha::Illrequest::Config;
50
use Koha::Illrequest::Config;
50
use Koha::SearchEngine::Elasticsearch;
51
use Koha::SearchEngine::Elasticsearch;
52
use Koha::Logger;
51
53
52
use C4::Members::Statistics;
54
use C4::Members::Statistics;
53
55
Lines 93-98 my $time_zone = { Link Here
93
    environment_invalid    => $env_invalid
95
    environment_invalid    => $env_invalid
94
};
96
};
95
97
98
{ # Logger checks
99
    my $log4perl_config = C4::Context->config("log4perl_conf");
100
    my @log4perl_errors;
101
    if ( ! $log4perl_config ) {
102
        push @log4perl_errors, 'missing_config_entry'
103
    }
104
    else {
105
        my @lines = read_file($log4perl_config) or push @log4perl_errors, 'cannot_read_config_file';
106
        for my $line ( @lines ) {
107
            next unless $line =~ m|log4perl.appender.\w+.filename=(.*)|;
108
            push @log4perl_errors, 'logfile_not_writable' unless -w $1;
109
        }
110
    }
111
    eval {Koha::Logger->get};
112
    push @log4perl_errors, 'cannot_init_module' and warn $@ if $@;
113
    $template->param( log4perl_errors => @log4perl_errors );
114
}
115
96
$template->param(
116
$template->param(
97
    time_zone              => $time_zone,
117
    time_zone              => $time_zone,
98
    current_date_and_time  => output_pref({ dt => dt_from_string(), dateformat => 'iso' })
118
    current_date_and_time  => output_pref({ dt => dt_from_string(), dateformat => 'iso' })
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt (-2 / +14 lines)
Lines 184-190 Link Here
184
        </div>
184
        </div>
185
185
186
        <div id="sysinfo">
186
        <div id="sysinfo">
187
    [% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatronOPACPrivacy || warnPrefAnonymousPatronAnonSuggestions || warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist || warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist || warnNoActiveCurrency || warnIsRootUser || xml_config_warnings.size || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || has_ai_issues || oauth2_missing_deps || bad_yaml_prefs || warnRelationships %]
187
    [% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatronOPACPrivacy || warnPrefAnonymousPatronAnonSuggestions || warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist || warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist || warnNoActiveCurrency || warnIsRootUser || xml_config_warnings.size || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || has_ai_issues || oauth2_missing_deps || bad_yaml_prefs || warnRelationships || log4perl_errors %]
188
        [% IF (warnIsRootUser) %]
188
        [% IF (warnIsRootUser) %]
189
            <h2>Warning regarding current user</h2>
189
            <h2>Warning regarding current user</h2>
190
            <p>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.</p>
190
            <p>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.</p>
Lines 246-251 Link Here
246
            [% END %]
246
            [% END %]
247
        [% END %]
247
        [% END %]
248
248
249
        [% IF log4perl_errors %]
250
            <h2>Logging system does not behave correctly</h2>
251
            [% FOR e IN log4perl_errors %]
252
                [% SWITCH e %]
253
                    [% CASE 'missing_config_entry' %]There is no 'log4perl_conf' entry in the config file.
254
                    [% CASE 'cannot_read_config_file' %]The log4perl config file cannot be opened.
255
                    [% CASE 'logfile_not_writable' %]One of the logfiles listed in the config file is not writable.
256
                    [% CASE 'cannot_init_module' %]The Koha::Logger module cannot be initiated correctly (check the log file).
257
                    [% CASE %]Unknown error "[% e %]"
258
                [% END %]
259
            [% END %]
260
        [% END %]
261
249
        [% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatronOPACPrivacy || warnPrefAnonymousPatronAnonSuggestions || warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist || warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist || warnNoActiveCurrency || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || oauth2_missing_deps || bad_yaml_prefs || warnIssuingRules %]
262
        [% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatronOPACPrivacy || warnPrefAnonymousPatronAnonSuggestions || warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist || warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist || warnNoActiveCurrency || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || oauth2_missing_deps || bad_yaml_prefs || warnIssuingRules %]
250
            <h2>Warnings regarding the system configuration</h2>
263
            <h2>Warnings regarding the system configuration</h2>
251
            <table>
264
            <table>
252
- 

Return to bug 25172