Bugzilla – Attachment 30847 Details for
Bug 12745
Add a sanity check for QueryParser configuration on about.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12745: (QA followup) remove misleading 'No warnings' message
Bug-12745-QA-followup-remove-misleading-No-warning.patch (text/plain), 8.75 KB, created by
Tomás Cohen Arazi (tcohen)
on 2014-08-15 15:59:08 UTC
(
hide
)
Description:
Bug 12745: (QA followup) remove misleading 'No warnings' message
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2014-08-15 15:59:08 UTC
Size:
8.75 KB
patch
obsolete
>From 7ca5bf77eab26ac1d23d296ab78f27f5dac2ebc3 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@gmail.com> >Date: Fri, 15 Aug 2014 12:45:10 -0300 >Subject: [PATCH] Bug 12745: (QA followup) remove misleading 'No warnings' > message > >Current code displays "No warnings" even if there are actually warnings >printed. > >It is not related to the bug itself, but as it was pointed out by the QAM, >I attach a followup to solve that. > >Regards >To+ > >Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 96 ++++++++++++------------ > 1 file changed, 50 insertions(+), 46 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >index 23b3bb0..6cf42ab 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >@@ -98,64 +98,68 @@ > </div> > > <div id="sysinfo"> >+ [% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatron || >+ warnNoActiveCurrency || QueryParserError || warnIsRootUser || xml_config_warnings.size %] > [% IF (warnIsRootUser) %] > <h2>Warning regarding current user</h2> > <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> > <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> > [% END %] >- <h2>Warnings regarding the system configuration</h2> >+ > [% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatron || > warnNoActiveCurrency || QueryParserError %] >- <table> >- <caption>Preferences and parameters</caption> >- [% IF (warnPrefBiblioAddsAuthorities) %] >- <tr><th scope="row"><b>Warning</b> </th><td>System preference 'AutoCreateAuthorities' set, but needs 'BiblioAddsAuthorities' set as well.</td></tr> >- [% END %] >- [% IF (warnPrefEasyAnalyticalRecords) %] >- <tr><th scope="row"><b>Warning</b> </th><td>System preference 'EasyAnalyticalRecords' set, but UseControlNumber preference is set to 'Use'. Set it to 'Don't use' or else the 'Show analytics' links in the staff client and the OPAC will be broken.</td></tr> >- [% END %] >- [% IF warnPrefAnonymousPatron %] >- <tr><th scope="row"><b>Warning</b> </th><td>System preference 'OPACPrivacy' set, but AnonymousPatron preference is set to '0'. Set it to a valid borrower number if you want that this feature works correctly.</td></tr> >- [% END %] >- [% IF warnNoActiveCurrency %] >- <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 > Currencies and exchange rates</a> and mark one currency as active.</td></tr> >- [% END %] >- [% IF QueryParserError %] >- <tr><th scope="row"><b>Warning</b> </th><td> >- You have set UseQueryParser but there was a problem inititializing QueryParser. >- [% IF QueryParserError.fallback %] >- The 'queryparser_config' entry is missing in your configuration file. >- <strong>[% QueryParserError.file %]</strong> was used instead without success. >- [% ELSE %] >- The following configuration file was used without success: <strong>[% QueryParserError.file %]</strong>. >+ <h2>Warnings regarding the system configuration</h2> >+ <table> >+ <caption>Preferences and parameters</caption> >+ [% IF (warnPrefBiblioAddsAuthorities) %] >+ <tr><th scope="row"><b>Warning</b> </th><td>System preference 'AutoCreateAuthorities' set, but needs 'BiblioAddsAuthorities' set as well.</td></tr> > [% END %] >- </td> >- </tr> >- [% END %] >- >- </table> >+ [% IF (warnPrefEasyAnalyticalRecords) %] >+ <tr><th scope="row"><b>Warning</b> </th><td>System preference 'EasyAnalyticalRecords' set, but UseControlNumber preference is set to 'Use'. Set it to 'Don't use' or else the 'Show analytics' links in the staff client and the OPAC will be broken.</td></tr> >+ [% END %] >+ [% IF warnPrefAnonymousPatron %] >+ <tr><th scope="row"><b>Warning</b> </th><td>System preference 'OPACPrivacy' set, but AnonymousPatron preference is set to '0'. Set it to a valid borrower number if you want that this feature works correctly.</td></tr> >+ [% END %] >+ [% IF warnNoActiveCurrency %] >+ <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 > Currencies and exchange rates</a> and mark one currency as active.</td></tr> >+ [% END %] >+ [% IF QueryParserError %] >+ <tr><th scope="row"><b>Warning</b> </th><td> >+ You have set UseQueryParser but there was a problem inititializing QueryParser. >+ [% IF QueryParserError.fallback %] >+ The 'queryparser_config' entry is missing in your configuration file. >+ <strong>[% QueryParserError.file %]</strong> was used instead without success. >+ [% ELSE %] >+ The following configuration file was used without success: <strong>[% QueryParserError.file %]</strong>. >+ [% END %] >+ </td> >+ </tr> >+ [% END %] >+ </table> > [% END %] >+ > [% IF xml_config_warnings.size %] >- <table> >- <caption>XML configuration file</caption> >- [% FOREACH config_entry IN xml_config_warnings %] >- [% IF config_entry.error == 'zebra_bib_index_mode_warn' %] >- <tr><th scope="row"><b>Warning</b> </th><td>The <zebra_bib_index_mode> 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> >- [% ELSIF config_entry.error == 'zebra_auth_index_mode_warn' %] >- <tr><th scope="row"><b>Warning</b> </th><td>The <zebra_auth_index_mode> 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> >- [% ELSIF config_entry.error == 'queryparser_entry_missing' %] >- <tr> >- <th scope="row"><b>Warning</b></th> >- <td>You have set UseQueryParser but the 'queryparser_config' entry is missing in your configuration >- file. <strong>[% config_entry.file %]</strong> is used as a fallback. >- </td> >- </tr> >+ <table> >+ <caption>XML configuration file</caption> >+ [% FOREACH config_entry IN xml_config_warnings %] >+ [% IF config_entry.error == 'zebra_bib_index_mode_warn' %] >+ <tr><th scope="row"><b>Warning</b> </th><td>The <zebra_bib_index_mode> 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> >+ [% ELSIF config_entry.error == 'zebra_auth_index_mode_warn' %] >+ <tr><th scope="row"><b>Warning</b> </th><td>The <zebra_auth_index_mode> 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> >+ [% ELSIF config_entry.error == 'queryparser_entry_missing' %] >+ <tr> >+ <th scope="row"><b>Warning</b></th> >+ <td>You have set UseQueryParser but the 'queryparser_config' entry is missing in your configuration >+ file. <strong>[% config_entry.file %]</strong> is used as a fallback. >+ </td> >+ </tr> >+ [% END %] > [% END %] >+ </table> > [% END %] >- </table> >- [% ELSE %] >- <p>No warnings</p> >- [% END %] >+ [% ELSE %] >+ <p>No warnings.</p> >+ [% END %] > </div> > > <div id="team"> >-- >1.9.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 12745
:
30709
|
30714
|
30847
|
30848
|
30849