Summary: | Corrupted storable string breaks SubfieldsToUseWhenPrefill functionality | ||
---|---|---|---|
Product: | Koha | Reporter: | paxed <pasi.kallinen> |
Component: | Cataloging | Assignee: | paxed <pasi.kallinen> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | minor | ||
Priority: | P5 - low | CC: | black23, caroline.cyr-la-rose, didier.gautheron, fridolin.somers, hayleypelham, m.de.rooy, wizzyrea |
Version: | Main | Keywords: | Academy |
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14844 | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
21.05.00,20.11.02
|
|
Circulation function: | |||
Attachments: |
Perl script to demonstrate uri (un)escape problem and base64url correctness
Bug 20971: additem Corrupted storable string Bug 20971: additem Corrupted storable string Bug 20971: additem Corrupted storable string Bug 20971: Prevent Storable::thaw to fail on LastCreatedItem |
Description
paxed
2018-06-21 08:25:08 UTC
Created attachment 76223 [details]
Perl script to demonstrate uri (un)escape problem and base64url correctness
Created attachment 76224 [details] [review] Bug 20971: additem Corrupted storable string Sometimes additem.pl will complain about "Storable::thaw failed to thaw LastCreatedItem-cookie.", see bug 14844. Now, actually fix the bug. The bug is caused by trying to URI (un)escape MARC::Record, binary data. We'll use a base64 url-safe version instead. Hi, some test plan? Thanks Mike Bump, any test plan to follow for this? Hi, We can't test this without a plan, please provide one. :) Cheers, Liz Hi Without this patch PrefillItem functionality is broken when adding unrelated items. TEST: 1: Set PrefillItem to 'The new item is prefilled...' 2: Set a SubfieldsToUseWhenPrefill, 'c' for example 3: Add a new item for biblio A with 'c' set. 4: Double check 'c' value is set for next new item A. 5: search and add a new item for biblio B 6: 'c' is not set Apply patch 7: logout, login 8: repeat steps 3, 4, and 5 . 9: now 'c' is set. Created attachment 115257 [details] [review] Bug 20971: additem Corrupted storable string Sometimes additem.pl will complain about "Storable::thaw failed to thaw LastCreatedItem-cookie.", see bug 14844. Now, actually fix the bug. The bug is caused by trying to URI (un)escape MARC::Record, binary data. We'll use a base64 url-safe version instead. Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi> Signed-off-by: James O'Keeffe <jamespfk@gmail.com> We've recently also run into this in a workshop - glad to find a fix here! Created attachment 115260 [details] [review] Bug 20971: additem Corrupted storable string Sometimes additem.pl will complain about "Storable::thaw failed to thaw LastCreatedItem-cookie.", see bug 14844. Now, actually fix the bug. The bug is caused by trying to URI (un)escape MARC::Record, binary data. We'll use a base64 url-safe version instead. Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi> Signed-off-by: James O'Keeffe <jamespfk@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Thank you, James! Created attachment 115332 [details] [review] Bug 20971: Prevent Storable::thaw to fail on LastCreatedItem Sometimes additem.pl will complain about "Storable::thaw failed to thaw LastCreatedItem-cookie.", see bug 14844. Now, actually fix the bug. The bug is caused by trying to URI (un)escape MARC::Record, binary data. We'll use a base64 url-safe version instead. Test plan: 1: Set PrefillItem to 'The new item is prefilled...' 2: Set a SubfieldsToUseWhenPrefill, 'c' for example 3: Add a new item for biblio A with 'c' set. 4: Double check 'c' value is set for next new item A. 5: search and add a new item for biblio B 6: 'c' is not set Apply patch 7: logout, login 8: repeat steps 3, 4, and 5 . 9: now 'c' is set. Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi> Signed-off-by: James O'Keeffe <jamespfk@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> JD amended patch: fix commit title and add test plan Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Pushed to master for 21.05, thanks to everybody involved! Pushed to 20.11.x for 20.11.02 |