Bug 6214

Summary: Staff client search results template error
Product: Koha Reporter: Owen Leonard <oleonard>
Component: SearchingAssignee: Galen Charlton <gmcharlt>
Status: CLOSED WORKSFORME QA Contact: Bugs List <koha-bugs>
Severity: normal    
Priority: P5 - low CC: chris
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Who signed the patch off: Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 5917    

Description Owen Leonard 2011-04-20 13:08:39 UTC
In the Template::Toolkit transition several commas have been translated to "comma." "<!-- TMPL_IF NAME="ms_any,phr" -->" has become "[% IF (ms_anycommaphr) %]" I'm assuming a template variable name with a comma is invalid under TT.
Comment 1 Chris Cormack 2011-04-20 22:25:47 UTC
Yes , is not part of a valid variable name in perl

The code should have been changed accordingly I will check
Comment 2 Chris Cormack 2011-04-20 22:30:07 UTC
if ($indexes[0] && (!$indexes[1] || $params->{'scan'})) {
    my $idx = "ms_".$indexes[0];
    $idx =~ s/\,/comma/g;  # template toolkit doesnt like variables with a , in it
    $template->param($idx => 1);

Yep looks ok to me, is the results page actually erroring owen, cos im thinking of marking this works for me
Comment 3 Owen Leonard 2011-04-20 23:47:53 UTC
I found the problem by searching for instances of "comma" based on other template errors. Judging from the template, it's part of the "Scan indexes" functionality, something I don't use or understand. There's no error in standard operation.
Comment 4 Chris Cormack 2011-04-21 20:13:25 UTC
Yeah its fixed in the perl, its setting the variables to match what is in the template, so i think tis all good