]> git.koha-community.org Git - koha.git/commit
Bug 31259: Escape infinite loop when lime cannot wrap enough
authorNick Clemens <nick@bywatersolutions.com>
Mon, 23 Jan 2023 12:51:48 +0000 (12:51 +0000)
committerArthur Suzuki <arthur.suzuki@biblibre.com>
Wed, 3 May 2023 19:09:45 +0000 (21:09 +0200)
commitc7cf11deb30eba75d032f4ff824e1dba78d71753
tree43ba7e4c190547b42e65e9ab6c6f2cf0b3f6a72d
parentc4ccac2bc3a0ac199b950730f4a490ca4ad8a98c
Bug 31259: Escape infinite loop when lime cannot wrap enough

It seems the wrapping here works with words, not characters. If a line is too long,
or too far over, we can't trim it enough. We need to escape if successive loops are
not changing the line

To test:
 1 - Using sample data, edit the layout to match picture in comment 9
 2 - Add some borrowers to a batch
 3 - Attempt to export batch and save PDF
 4 - Staff client waits
 5 - ps aux | grep card
 6 - Note the job keeps running
 7 - Kill it
 8 - Apply patch
 9 - Restart_all
10 - Export batch again
11 - Success, you get a badly formatted PDF, rather than nothing
12 - Note the PDF does not show "Yakama Nation Library"
13 - Edit layout, male "Lower left X" 20 instead of 220
14 - Export again and note text field 1 shows correctly

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a18f65cdcc51571bc9eae1e903a6b7b676e6a89e)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit f1010ee062263c84be1cf8f9117730c536f9c8f5)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit dda7ff90bdc768e5558c0958d937789b2b834502)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
C4/Patroncards/Patroncard.pm