Bug 30583 - Hold system broken for translated template
Summary: Hold system broken for translated template
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low blocker (vote)
Assignee: Jonathan Druart
QA Contact: Tomás Cohen Arazi
URL:
Keywords: rel_21_05_candidate, rel_21_11_candidate
Depends on: 29338
Blocks:
  Show dependency treegraph
 
Reported: 2022-04-21 14:27 UTC by Jonathan Druart
Modified: 2022-04-25 20:50 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Text to go in the release notes:
Version(s) released in:
22.05.00,21.11.05,21.05.14


Attachments
Bug 30583: Fix hold system for translated templates (1.73 KB, patch)
2022-04-21 14:32 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30583: Fix hold system for translated templates (1.79 KB, patch)
2022-04-21 14:43 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 30583: Fix hold system for translated templates (1.84 KB, patch)
2022-04-21 16:05 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2022-04-21 14:27:40 UTC
With es-ES:
Template process failed: file error - parse error - holds_table.inc line 216-217: unexpected token (hold)                                                                                                              [% " hold.reserve_id="hold.reserve_id" html="html" name="printholdslip" type="button" value="Recibo" |="|"></td>                                                              
 [% ELSE %] at /kohadevbox/koha/C4/Templates.pm line 127
Comment 1 Jonathan Druart 2022-04-21 14:29:35 UTC
Caused by
  commit a68021a2387ff1caf854c17fc5331e85926c1f7e
  Bug 29338: Add print hold/transfer button to request.tt
Comment 2 Jonathan Druart 2022-04-21 14:32:12 UTC
Created attachment 133569 [details] [review]
Bug 30583: Fix hold system for translated templates

There are missing quotes, and the translate script is messing up with
the generated template.

Error is:
Template process failed: file error - parse error - holds_table.inc line 216-217: unexpected token (hold)

The generated line, without this patch is:
216 <td><input %]="%]" class="printholdslip" data-reserve_id="[%" hold.reserve_id="hold.reserve_id" html="html" name="printholdslip" type="button" value="Recibo" |="|"></td>
With this patch applied:
216  <td><input class="printholdslip" data-reserve_id="[% hold.reserve_id | html %]" name="printholdslip" type="button" value="Recibo"></td>
Comment 3 Lucas Gass 2022-04-21 14:43:03 UTC
Created attachment 133570 [details] [review]
Bug 30583: Fix hold system for translated templates

There are missing quotes, and the translate script is messing up with
the generated template.

Error is:
Template process failed: file error - parse error - holds_table.inc line 216-217: unexpected token (hold)

The generated line, without this patch is:
216 <td><input %]="%]" class="printholdslip" data-reserve_id="[%" hold.reserve_id="hold.reserve_id" html="html" name="printholdslip" type="button" value="Recibo" |="|"></td>
With this patch applied:
216  <td><input class="printholdslip" data-reserve_id="[% hold.reserve_id | html %]" name="printholdslip" type="button" value="Recibo"></td>

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 4 Lucas Gass 2022-04-21 14:43:34 UTC
Thanks Jonathan, sorry about that one :(
Comment 5 Tomás Cohen Arazi 2022-04-21 16:05:29 UTC
Created attachment 133587 [details] [review]
Bug 30583: Fix hold system for translated templates

There are missing quotes, and the translate script is messing up with
the generated template.

Error is:
Template process failed: file error - parse error - holds_table.inc line 216-217: unexpected token (hold)

The generated line, without this patch is:
216 <td><input %]="%]" class="printholdslip" data-reserve_id="[%" hold.reserve_id="hold.reserve_id" html="html" name="printholdslip" type="button" value="Recibo" |="|"></td>
With this patch applied:
216  <td><input class="printholdslip" data-reserve_id="[% hold.reserve_id | html %]" name="printholdslip" type="button" value="Recibo"></td>

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 6 Fridolin Somers 2022-04-21 23:42:30 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄
Comment 7 Kyle M Hall 2022-04-25 19:05:54 UTC
Pushed to 21.11.x for 21.11.05
Comment 8 Andrew Fuerste-Henry 2022-04-25 19:35:52 UTC
Pushed to 21.05.x for 21.05.14
Comment 9 Victor Grousset/tuxayo 2022-04-25 20:50:32 UTC
Missing dependencies for 20.11.x, it shouldn't be affected, no backport.
Bullet dodged :)