Bug 12745 - Add a sanity check for QueryParser configuration on about.pl
Summary: Add a sanity check for QueryParser configuration on about.pl
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 12742
  Show dependency treegraph
 
Reported: 2014-08-11 15:08 UTC by Tomás Cohen Arazi
Modified: 2020-02-24 20:53 UTC (History)
2 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 12745: Add a sanity check for QueryParser configuration on about.pl (6.53 KB, patch)
2014-08-11 15:59 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 12745: Add a sanity check for QueryParser configuration on about.pl (6.71 KB, patch)
2014-08-11 18:47 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 12745: (QA followup) remove misleading 'No warnings' message (8.75 KB, patch)
2014-08-15 15:59 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
[PASSED QA] Bug 12745: Add a sanity check for QueryParser configuration on about.pl (6.89 KB, patch)
2014-08-15 16:36 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 12745: (QA followup) remove misleading 'No warnings' message (8.82 KB, patch)
2014-08-15 16:36 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Tomás Cohen Arazi 2014-08-11 15:08:45 UTC
Currently there's no way for the user to know he has a bad QueryParser configuration. Koha would just fallback to not using it.

We should have a warning for this on about.pl
Comment 1 Tomás Cohen Arazi 2014-08-11 15:59:37 UTC Comment hidden (obsolete)
Comment 2 Marc Véron 2014-08-11 18:47:25 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2014-08-15 14:54:54 UTC
With the typo in the path (non existing file), 'no warnings' is stil shown
below the warnings.
Comment 4 Tomás Cohen Arazi 2014-08-15 15:59:08 UTC Comment hidden (obsolete)
Comment 5 Katrin Fischer 2014-08-15 16:36:55 UTC
Created attachment 30848 [details] [review]
[PASSED QA] 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.
Comment 6 Katrin Fischer 2014-08-15 16:36:59 UTC
Created attachment 30849 [details] [review]
[PASSED QA] 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>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comment 7 Tomás Cohen Arazi 2014-08-15 18:01:20 UTC
Patch pushed to master.