Bug 9727

Summary: Typo in code causes compilation failure with Solr enabled
Product: Koha Reporter: Colin Campbell <colin.campbell>
Component: Architecture, internals, and plumbingAssignee: Colin Campbell <colin.campbell>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P5 - low CC: chris
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Proposed patch
Bug 9727: Fix typo in variable name
Bug 9727: Fix typo in variable name
[PASSED QA] Bug 9727: Fix typo in variable name
[PASSED QA] Bug 9727: Fix typo in variable name

Description Colin Campbell 2013-02-28 09:56:43 UTC
With searchengine set to Solr typo in Koha::Searchengine::Solr::Index causes compilation failure you can test by running rebuild_solr.pl -i thus:

 misc/migration_tools/rebuild_solr.pl -i
Global symbol "$record_type" requires explicit package name at /home/cc/kohaclone/Koha/SearchEngine/Solr/Index.pm line 43.
Compilation failed in require at /usr/lib64/perl5/vendor_perl/Class/MOP/Method.pm line 125.

Fixing the typo allows the command to run:

misc/migration_tools/rebuild_solr.pl -i
SolrAPI = http://localhost:8983/solr/koha
Solr is Down
Comment 1 Colin Campbell 2013-02-28 10:03:20 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2013-02-28 10:46:19 UTC Comment hidden (obsolete)
Comment 3 Dobrica Pavlinusic 2013-03-18 14:47:56 UTC Comment hidden (obsolete)
Comment 4 Katrin Fischer 2013-03-19 08:59:40 UTC Comment hidden (obsolete)
Comment 5 Katrin Fischer 2013-03-19 09:00:28 UTC
Created attachment 16326 [details] [review]
[PASSED QA] Bug 9727: Fix typo in variable name

Variable is passed as recordtype not record_type
correct name

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
before applying the patch
$ perl -wc Koha/SearchEngine/Solr/Index.pm
Global symbol "$record_type" requires explicit package name at Koha/SearchEngine/Solr/Index.pm line 43.
Koha/SearchEngine/Solr/Index.pm had compilation errors.

after
Koha/SearchEngine/Solr/Index.pm syntax OK

Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
I can't really test this with solr, but as various people
at the hackfest have confirmed this to be fixing the problem
I feel save to pass QA. All tests and QA script pass too.
Comment 6 Jared Camins-Esakov 2013-03-20 00:48:40 UTC
This patch has been pushed to master.
Comment 7 Chris Cormack 2013-03-29 06:16:49 UTC
Pushed to 3.10.x will be in 3.10.5