Bug 6214 - Staff client search results template error
Summary: Staff client search results template error
Status: CLOSED WORKSFORME
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Galen Charlton
QA Contact: Bugs List
URL:
Keywords:
Depends on:
Blocks: 5917
  Show dependency treegraph
 
Reported: 2011-04-20 13:08 UTC by Owen Leonard
Modified: 2012-10-26 00:41 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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