Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Bug 8301 - Display additional system information (preferences) on Abo…

…ut page to minimize support cases

To minimize support questions regarding common mistakes, the About
page should have an additional tab that displays warnings if depractated
and/or mutual excluding system preferences are used.

To test patch use values as displayed on screenshot attached.

New: Shows error message in Tab Server Information if Zebra server is not started
(...and changes added...)

Suggestions for other values to add are welcome.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
  • Loading branch information...
commit 9f231c4dd907f6187488fd38549b4c9d95fb6693 1 parent 7ddf7cb
Marc Veron authored PaulPoulain committed
Showing with 45 additions and 0 deletions.
  1. +18 −0 about.pl
  2. +27 −0 koha-tmpl/intranet-tmpl/prog/en/modules/about.tt
View
18 about.pl
@@ -60,6 +60,18 @@
$apacheVersion = (`/usr/sbin/apache2 -V`)[0] unless $apacheVersion;
my $zebraVersion = `zebraidx -V`;
+# Additional system information for warnings
+my $prefNoZebra = C4::Context->preference('nozebra');
+my $prefAutoCreateAuthorities = C4::Context->preference('AutoCreateAuthorities');
+my $prefBiblioAddsAuthorities = C4::Context->preference('BiblioAddsAuthorities');
+my $warnPrefBiblioAddsAuthorities = ( $prefAutoCreateAuthorities && ( !$prefBiblioAddsAuthorities) );
+
+my $prefEasyAnalyticalRecords = C4::Context->preference('EasyAnalyticalRecords');
+my $prefUseControlNumber = C4::Context->preference('UseControlNumber');
+my $warnPrefEasyAnalyticalRecords = ( $prefEasyAnalyticalRecords && $prefUseControlNumber );
+
+my $errZebraConnection = C4::Context->Zconn("biblioserver",0)->errcode();
+
$template->param(
kohaVersion => $kohaVersion,
osVersion => $osVersion,
@@ -69,6 +81,12 @@
mysqlVersion => $mysqlVersion,
apacheVersion => $apacheVersion,
zebraVersion => $zebraVersion,
+ prefNoZebra => $prefNoZebra,
+ prefBiblioAddsAuthorities => $prefBiblioAddsAuthorities,
+ prefAutoCreateAuthorities => $prefAutoCreateAuthorities,
+ warnPrefBiblioAddsAuthorities => $warnPrefBiblioAddsAuthorities,
+ warnPrefEasyAnalyticalRecords => $warnPrefEasyAnalyticalRecords,
+ errZebraConnection => $errZebraConnection,
);
my @components = ();
View
27 koha-tmpl/intranet-tmpl/prog/en/modules/about.tt
@@ -26,6 +26,7 @@
<ul>
<li><a href="#about">Server Information</a></li>
<li><a href="#perl">Perl modules</a></li>
+ <li><a href="#sysinfo">System information</a></li>
<li><a href="#team">Koha Team</a></li>
<li><a href="#licenses">Licenses</a></li>
<li><a href="#translations">Translations</a></li>
@@ -48,6 +49,11 @@
<tr><th scope="row">MySQL version: </th><td>[% mysqlVersion |html %]</td></tr>
<tr><th scope="row">Apache version: </th><td>[% apacheVersion |html %]</td></tr>
<tr><th scope="row">Zebra version: </th><td>[% zebraVersion |html %]</td></tr>
+ [% IF (errZebraConnection == 10000) %]
+ <tr><th scope="row"><b>Error</b> </th><td>Zebra server seems not to be available. Is it started?</td></tr>
+ [% ELSIF (errZebraConnection) %]
+ <tr><th scope="row"><b>Warning</b> </th><td>Error message from Zebra: [% ( errZebraConnection ) %] </td></tr>
+ [% END %]
</table>
</div>
<div id="perl">
@@ -90,6 +96,27 @@
[% END %]
</table>
</div>
+
+ <div id="sysinfo">
+ <h2>Warnings regarding the system configuration</h2>
+ [% IF ( (prefNoZebra) || (warnPrefBiblioAddsAuthorities) || warnPrefEasyAnalyticalRecords ) %]
+ <table>
+ <caption>Preferences</caption>
+ [% IF (prefNoZebra) %]
+ <tr><th scope="row"><b>Warning</b> </th><td>System preference 'nozebra' set. Deprectated!</td></tr>
+ [% END %]
+ [% 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 %]
+ </table>
+ [% ELSE %]
+ <p>No warnings</p>
+ [% END %]
+ </div>
+
<div id="team">
<h2>Special thanks to the following organizations</h2>
<ul>
Please sign in to comment.
Something went wrong with that request. Please try again.