Bug 30455

Summary: Incorrect template filter breaks holds
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED INVALID QA Contact: Testopia <testopia>
Severity: critical    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 30063    
Bug Blocks:    
Attachments: Bug 30455: Incorrect template filter breaks holds

Description Owen Leonard 2022-04-05 11:15:45 UTC
An incorrect filter was added to patron-search.inc:

let defer_loading = [% defer_loading | html ? 1 : 0 %];

Filters don't belong inside conditionals. This makes request.pl break with an error:

Template process failed: file error - parse error - patron-search.inc line 252: unexpected token (?)
  [% defer_loading | html ? 1 : 0 %] at /kohadevbox/koha/C4/Templates.pm line 127
Comment 1 Owen Leonard 2022-04-05 11:20:10 UTC
(In reply to Owen Leonard from comment #0)
> This makes request.pl break with an error

...Or any other page which uses patron-search.inc.
Comment 2 Owen Leonard 2022-04-05 11:21:17 UTC
Created attachment 132957 [details] [review]
Bug 30455: Incorrect template filter breaks holds

This patch removes an incorrect template filter from inside a T:T
conditional. This change should fix a non-functional request.pl and
anywhere else patron-search.inc is used.

The QA failure for a missing filter is a false positive.
Comment 3 Owen Leonard 2022-04-05 11:28:11 UTC
Will be patched on 30063