Bug 20971: Prevent Storable::thaw to fail on LastCreatedItem
authorPasi Kallinen <pasi.kallinen@joensuu.fi>
Thu, 21 Jun 2018 08:15:23 +0000 (11:15 +0300)
committerFridolin Somers <fridolin.somers@biblibre.com>
Wed, 20 Jan 2021 09:03:12 +0000 (10:03 +0100)
commitf393408a05233723e8aaaa6207de74a83c4190dd
tree4bb794ed883f0ff395773806e382c48c8ad2dd3d
parentdd2489c17544becb33bff1193c35875a14abad6a
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>
(cherry picked from commit 9a7f7787376253e0c0cda905734006ceba472d60)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
cataloguing/additem.pl