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

(-)a/about.pl (+29 lines)
Lines 92-97 if ( ! defined C4::Context->config('zebra_auth_index_mode') ) { Link Here
92
    };
92
    };
93
}
93
}
94
94
95
# Test QueryParser configuration sanity
96
if ( C4::Context->preference( 'UseQueryParser' ) ) {
97
    # Get the QueryParser configuration file name
98
    my $queryparser_file          = C4::Context->config( 'queryparser_config' );
99
    my $queryparser_fallback_file = '/etc/koha/searchengine/queryparser.yaml';
100
    # Check QueryParser is functional
101
    my $QParser = C4::Context->queryparser();
102
    my $queryparser_error = {};
103
    if ( ! defined $QParser || ref($QParser) ne 'Koha::QueryParser::Driver::PQF' ) {
104
        # Error initializing the QueryParser object
105
        # Get the used queryparser.yaml file path to report the user
106
        $queryparser_error->{ fallback } = ( defined $queryparser_file ) ? 0 : 1;
107
        $queryparser_error->{ file }     = ( defined $queryparser_file )
108
                                                ? $queryparser_file
109
                                                : $queryparser_fallback_file;
110
        # Report error data to the template
111
        $template->param( QueryParserError => $queryparser_error );
112
    } else {
113
        # Check for an absent queryparser_config entry in koha-conf.xml
114
        if ( ! defined $queryparser_file ) {
115
            # Not an error but a warning for the missing entry in koha-conf-xml
116
            push @xml_config_warnings, {
117
                    error => 'queryparser_entry_missing',
118
                    file  => $queryparser_fallback_file
119
            };
120
        }
121
    }
122
}
123
95
$template->param(
124
$template->param(
96
    kohaVersion   => $kohaVersion,
125
    kohaVersion   => $kohaVersion,
97
    osVersion     => $osVersion,
126
    osVersion     => $osVersion,
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt (-2 / +22 lines)
Lines 104-110 Link Here
104
            <p>Please log in instead with a regular staff account. To create a staff account, create a library, a patron category 'Staff' and add a new patron. Then give this patron permissions from 'More' in the toolbar.</p>
104
            <p>Please log in instead with a regular staff account. To create a staff account, create a library, a patron category 'Staff' and add a new patron. Then give this patron permissions from 'More' in the toolbar.</p>
105
        [% END %]
105
        [% END %]
106
            <h2>Warnings regarding the system configuration</h2>
106
            <h2>Warnings regarding the system configuration</h2>
107
        [% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatron || warnNoActiveCurrency %]
107
        [% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatron ||
108
              warnNoActiveCurrency || QueryParserError %]
108
        <table>
109
        <table>
109
            <caption>Preferences and parameters</caption>
110
            <caption>Preferences and parameters</caption>
110
            [% IF (warnPrefBiblioAddsAuthorities) %]
111
            [% IF (warnPrefBiblioAddsAuthorities) %]
Lines 119-124 Link Here
119
            [% IF warnNoActiveCurrency %]
120
            [% IF warnNoActiveCurrency %]
120
                <tr><th scope="row"><b>Warning</b> </th><td>No active currency is defined. Please go to <a href="/cgi-bin/koha/admin/currency.pl">Administration &gt; Currencies and exchange rates</a> and mark one currency as active.</td></tr>
121
                <tr><th scope="row"><b>Warning</b> </th><td>No active currency is defined. Please go to <a href="/cgi-bin/koha/admin/currency.pl">Administration &gt; Currencies and exchange rates</a> and mark one currency as active.</td></tr>
121
            [% END %]
122
            [% END %]
123
            [% IF QueryParserError %]
124
                <tr><th scope="row"><b>Warning</b> </th><td>
125
                    You have set UseQueryParser but there was a problem inititializing QueryParser.
126
                [% IF QueryParserError.fallback %]
127
                    The 'queryparser_config' entry is missing in your configuration file.
128
                    <strong>[% QueryParserError.file %]</strong> was used instead without success.
129
                [% ELSE %]
130
                    The following configuration file was used without success: <strong>[% QueryParserError.file %]</strong>.
131
                [% END %]
132
                    </td>
133
                </tr>
134
            [% END %]
135
122
        </table>
136
        </table>
123
        [% END %]
137
        [% END %]
124
        [% IF xml_config_warnings.size %]
138
        [% IF xml_config_warnings.size %]
Lines 129-134 Link Here
129
            <tr><th scope="row"><b>Warning</b> </th><td>The &lt;zebra_bib_index_mode&gt; entry is missing in your configuration file. It should be set to <strong>dom</strong> or <strong>grs1</strong>. It will default to <strong>grs1</strong> but this could change in the future.</td></tr>
143
            <tr><th scope="row"><b>Warning</b> </th><td>The &lt;zebra_bib_index_mode&gt; entry is missing in your configuration file. It should be set to <strong>dom</strong> or <strong>grs1</strong>. It will default to <strong>grs1</strong> but this could change in the future.</td></tr>
130
            [% ELSIF config_entry.error == 'zebra_auth_index_mode_warn' %]
144
            [% ELSIF config_entry.error == 'zebra_auth_index_mode_warn' %]
131
            <tr><th scope="row"><b>Warning</b> </th><td>The &lt;zebra_auth_index_mode&gt; entry is missing in your configuration file. It should be set to <strong>dom</strong> or <strong>grs1</strong>. It will default to <strong>dom</strong> but this could change in the future.</td></tr>
145
            <tr><th scope="row"><b>Warning</b> </th><td>The &lt;zebra_auth_index_mode&gt; entry is missing in your configuration file. It should be set to <strong>dom</strong> or <strong>grs1</strong>. It will default to <strong>dom</strong> but this could change in the future.</td></tr>
146
            [% ELSIF config_entry.error == 'queryparser_entry_missing' %]
147
            <tr>
148
                <th scope="row"><b>Warning</b></th>
149
                <td>You have set UseQueryParser but the 'queryparser_config' entry is missing in your configuration
150
                    file. <strong>[% config_entry.file %]</strong> is used as a fallback.
151
                </td>
152
            </tr>
132
            [% END %]
153
            [% END %]
133
        [% END %]
154
        [% END %]
134
        </table>
155
        </table>
135
- 

Return to bug 12745