https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36797
Bug ID: 36797
Summary: Record with 1000+ holds and unique priorities causes a
500 error
Change sponsored?: ---
Product: Koha
Version: Main
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P5 - low
Component: Hold requests
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
CC: [email protected]
To recreate:
1. Find a record that has 1000 non-waiting holds with different priorities.
2. Try loading the reserve page for that record (
/reserve/request.pl?biblionumber=X )
4. Error: Template process failed: undef error - WHILE loop terminated (> 1000
iterations)
This looks to be because of TT 'While' loop in holds_table.inc:
[% BLOCK priority_dropdown %]
[%- SET loop_priority = 1 -%]
[%- WHILE loop_priority <= last_priority -%]
[%- IF this_priority == loop_priority -%]
<option value="[% loop_priority | html %]"
selected="selected">[% loop_priority | html %]</option>
[%- ELSE -%]
<option value="[% loop_priority | html %]">[% loop_priority |
html %]</option>
[%- END -%]
[%- loop_priority = loop_priority + 1- %]
[%- END -%]
[% END %]
TT documentation states that it will terminate a WHILE loop larger than 1000 to
prevent runaways:
https://template-toolkit.org/docs/manual/Directives.html#section_WHILE
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/