Summary: | Record titles with parentheses causing label weirdness | ||
---|---|---|---|
Product: | Koha | Reporter: | Kyle M Hall (khall) <kyle> |
Component: | Label/patron card printing | Assignee: | Chris Nighswonger <cnighswonger> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | major | ||
Priority: | P1 - high | CC: | chris, fridolin.somers, mtj, philippe.blouin, tomascohen |
Version: | 3.16 | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Label PDF with weirdness
Label PDF after patch Bug 13124 - Record titles with parentheses causing label weirdness Bug 13124 - Record titles with parentheses causing label weirdness [SIGNED OFF] Bug 13124 - Record titles with parentheses causing label weirdness [PASSED QA] Bug 13124 - Record titles with parentheses causing label weirdness |
Description
Kyle M Hall (khall)
2014-10-21 18:43:54 UTC
Created attachment 32563 [details]
Label PDF with weirdness
That is due to the embedded parenthesis. The inner parenthesis are not being escaped properly by the code which handles that. Without looking, I'd say its a pretty trivial fix. Created attachment 32564 [details]
Label PDF after patch
Created attachment 32565 [details] [review] Bug 13124 - Record titles with parentheses causing label weirdness That fix will cause problems with the postscript stream. I don't remember exactly the case, but do remember it took some hours to find and fix. At a minimum these lines should only be commented out rather than removed and a commend added to the effect of what I've mentioned. Test Plan ( using sample data included with Koha ) 1) Catalog a record and item with the title "Oh no! or, (How my science project destroyed the world) /" 2) Edit the DEFAULT template a) Set layout type to Biblio b) Set data fields to "title, author, isbn, issn, itemtype, barcode, itemcallnumber" c) Set font size to 10 3) Create a batch with just the one item you created 4) Export the PDF with the Avery template and the DEFAULT layout 5) Note the weirdness 6) Apply this patch 7) Re-export the PDF, note it's no longer weird ; ) (In reply to Chris Nighswonger from comment #5) > That fix will cause problems with the postscript stream. I don't remember > exactly the case, but do remember it took some hours to find and fix. At a > minimum these lines should only be commented out rather than removed and a > commend added to the effect of what I've mentioned. Will do! I don't see any negative effects. Possibly the need for them was fixed downstream. Created attachment 32566 [details] [review] Bug 13124 - Record titles with parentheses causing label weirdness Test Plan ( using sample data included with Koha ) 1) Catalog a record and item with the title "Oh no! or, (How my science project destroyed the world) /" 2) Edit the DEFAULT template a) Set layout type to Biblio b) Set data fields to "title, author, isbn, issn, itemtype, barcode, itemcallnumber" c) Set font size to 10 3) Create a batch with just the one item you created 4) Export the PDF with the Avery template and the DEFAULT layout 5) Note the weirdness 6) Apply this patch 7) Re-export the PDF, note it's no longer weird ; ) I'm not able to reproduce the bug. I followed the instructions but the exports just gives me that result : 0 0 0 0 and the XML files give to me correct informations. Not only is this bug still valid, it's worse than I had believed. It appears that parens in other parts of the label will stop the reset of the labels in a batch from printing! (In reply to Kyle M Hall from comment #10) > Not only is this bug still valid, it's worse than I had believed. It appears > that parens in other parts of the label will stop the reset of the labels in > a batch from printing! I can see how this would be a problem, however. PDF::Reuse::prText presently attempts to escape parentheses. I don't remember why I saw the need to escape them in the label module, but it certainly results in double escapment which could lead to various strange results. Bumping the importance of this fix. I'll try to sign off today or tomorrow. Created attachment 34337 [details] [review] [SIGNED OFF] Bug 13124 - Record titles with parentheses causing label weirdness Test Plan ( using sample data included with Koha ) 1) Catalog a record and item with the title "Oh no! or, (How my science project destroyed the world) /" 2) Edit the DEFAULT template a) Set layout type to Biblio b) Set data fields to "title, author, isbn, issn, itemtype, barcode, itemcallnumber" c) Set font size to 10 3) Create a batch with just the one item you created 4) Export the PDF with the Avery template and the DEFAULT layout 5) Note the weirdness 6) Apply this patch 7) Re-export the PDF, note it's no longer weird ; ) Signed-off-by: Nick Clemens <nick@quecheelibrary.org> Created attachment 34725 [details] [review] [PASSED QA] Bug 13124 - Record titles with parentheses causing label weirdness Test Plan ( using sample data included with Koha ) 1) Catalog a record and item with the title "Oh no! or, (How my science project destroyed the world) /" 2) Edit the DEFAULT template a) Set layout type to Biblio b) Set data fields to "title, author, isbn, issn, itemtype, barcode, itemcallnumber" c) Set font size to 10 3) Create a batch with just the one item you created 4) Export the PDF with the Avery template and the DEFAULT layout 5) Note the weirdness 6) Apply this patch 7) Re-export the PDF, note it's no longer weird ; ) Signed-off-by: Nick Clemens <nick@quecheelibrary.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Patch pushed to master. Thanks Kyle! Pushed to 3.18.x will be in 3.18.3 Pushed to 3.16.x, patch will be in 3.16.7 Pushed to 3.14, will be in 3.14.14. In my opinion, dead code must be removed instead of commented. |