Bug 27578 - Searchid not initialized when adding a new record
Summary: Searchid not initialized when adding a new record
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Nick Clemens
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-29 13:47 UTC by Nick Clemens
Modified: 2021-03-22 16:06 UTC (History)
5 users (show)

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


Attachments
Bug 27578: Initialize searchid as blank when not populated (1.21 KB, patch)
2021-01-29 13:49 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 27578: Initialize searchid as blank when not populated (1.27 KB, patch)
2021-02-24 05:28 UTC, Phil Ringnalda
Details | Diff | Splinter Review
Bug 27578: Initialize searchid as blank when not populated (1.36 KB, patch)
2021-02-26 08:44 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2021-01-29 13:47:09 UTC
addbiblio.pl takes a searchid parameter which is built into several urls, however, when adding a new biblio and not coming from a search this value is never initialized and there is a warn
Comment 1 Nick Clemens 2021-01-29 13:49:23 UTC
Created attachment 116031 [details] [review]
Bug 27578: Initialize searchid as blank when not populated

This patch simply sets the searchid to a blank string if not passed in

To test:
1 - Add a new biblio and save it
2 - Check the logs: /var/log/koha/kohadev/plack-intranet-error.log (or similar)
3 - Note warn about uninitialized value
4 - Apply patch
5 - Add a new biblio
6 - No warn
Comment 2 Phil Ringnalda 2021-02-24 05:28:01 UTC
Created attachment 117238 [details] [review]
Bug 27578: Initialize searchid as blank when not populated

This patch simply sets the searchid to a blank string if not passed in

To test:
1 - Add a new biblio and save it
2 - Check the logs: /var/log/koha/kohadev/plack-intranet-error.log (or similar)
3 - Note warn about uninitialized value
4 - Apply patch
5 - Add a new biblio
6 - No warn

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Comment 3 Marcel de Rooy 2021-02-26 08:44:29 UTC
Created attachment 117366 [details] [review]
Bug 27578: Initialize searchid as blank when not populated

This patch simply sets the searchid to a blank string if not passed in

To test:
1 - Add a new biblio and save it
2 - Check the logs: /var/log/koha/kohadev/plack-intranet-error.log (or similar)
3 - Note warn about uninitialized value
4 - Apply patch
5 - Add a new biblio
6 - No warn

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 4 Jonathan Druart 2021-03-01 10:29:05 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 5 Fridolin Somers 2021-03-04 09:36:34 UTC
In my opinion we should use q{} for empty strings.
Comment 6 Fridolin Somers 2021-03-04 09:36:52 UTC
Pushed to 20.11.x for 20.11.04
Comment 7 Andrew Fuerste-Henry 2021-03-05 21:22:30 UTC
Pushed to 20.05.x for 20.05.10
Comment 8 Victor Grousset/tuxayo 2021-03-22 16:06:10 UTC
Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.