Bug 12745: Add a sanity check for QueryParser configuration on about.pl
authorTomas Cohen Arazi <tomascohen@gmail.com>
Mon, 11 Aug 2014 15:09:16 +0000 (12:09 -0300)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Fri, 15 Aug 2014 17:39:21 +0000 (14:39 -0300)
commitce1ed2fab4255e9e0cc7785afed27135a16ec04e
tree42335f84b39de30660262a380cda0a4a970cb05f
parentba107bb8875d7f9194cdb499d09c9faee81c1e8b
Bug 12745: Add a sanity check for QueryParser configuration on about.pl

Currently there's no way for the user to know he has a bad QueryParser configuration.
Koha would just fallback to not using it.

This patch adds a check for QueryParser configuration sanity in about.pl

To test:
- Have UseQueryParser = "Don't try"
- Go to More > About Koha > System information
- No QueryParser-related warnings
- Set UseQueryParser = "Try"
- Go to More > About Koha > System information
- On a normal setup you shouldn't have any QueryParser-related warnings
- Edit your koha-conf.xml file and change the queryparser_config entry to a
  non-existent filename.
- Reload More > About Koha > System information
=> SUCCESS: a warning message tells you the filename used, and says it failed.
- Now just delete the entry in koha-conf.xml
- Reload More > About Koha > System information
=> SUCCESS: a warning message tells you don't have the queryparser_entry in
  your koha-conf.xml file.
  Subtest:
  a - The file /etc/koha/searchengine/queryparser.yaml exists:
    => SUCCESS: a warning saying it used a fallback is shown
  b - The file doesn't exist
    => SUCCESS: Missing entry warning, plus a failure message for the fallback.
- Sign off :-D

Regards
To+

Sponsored-by: Universidad Nacional de Cordoba
Followed test plan. Works as expected.
Signed-off-by: Marc VĂ©ron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
With the typo in the path (non existing file), 'no warnings' is stil shown
below the warnings. The follow-up fixes that.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
about.pl
koha-tmpl/intranet-tmpl/prog/en/modules/about.tt