Bug 28545

Summary: Noisy uninitialized warn at opac-MARCdetail.pl line 313
Product: Koha Reporter: Marcel de Rooy <m.de.rooy>
Component: OPACAssignee: Marcel de Rooy <m.de.rooy>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: david, fridolin.somers, kyle, victor
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
This removes "..Use of uninitialized value in concatenation (.) or string at.." warning messages from the plack-opac-error.log when accessing the MARC view page for a record in the OPAC.
Version(s) released in:
21.11.00,21.05.02,20.11.08
Circulation function:
Bug Depends on:    
Bug Blocks: 25790    
Attachments: Bug 28545: Noisy uninitialized warn at opac-MARCdetail.pl line 313
Bug 28545: Noisy uninitialized warn at opac-MARCdetail.pl line 313
Bug 28545: Noisy uninitialized warn at opac-MARCdetail.pl line 313
Bug 28545: Noisy uninitialized warn at opac-MARCdetail.pl line 313

Description Marcel de Rooy 2021-06-10 14:01:49 UTC
19.11 warning like: Use of uninitialized value in concatenation (.) or string at /usr/share/koha/opac/opac-MARCdetail.pl line 312.
Same code, line 313 in master.
Trivial fix.
Comment 1 Marcel de Rooy 2021-06-10 14:04:13 UTC
Created attachment 121794 [details] [review]
Bug 28545: Noisy uninitialized warn at opac-MARCdetail.pl line 313

Test plan:
You need an item with some null values.
Check your logs before and after applying this change.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 2 Marcel de Rooy 2021-06-11 07:51:11 UTC
Created attachment 121810 [details] [review]
Bug 28545: Noisy uninitialized warn at opac-MARCdetail.pl line 313

Test plan:
You do not even need a NULL value in a authorised value controlled
item field, a zero in damaged or withdrawn is enough to trigger the
warnings. (Because only the 1 is linked to an authvalue.)

Check your plack-opac-error.log before and after applying this change.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Without the patch I had at least four warnings per item: withdrawn,
lost, damaged and notforloan.
Comment 3 David Nind 2021-06-12 22:51:00 UTC
Created attachment 121894 [details] [review]
Bug 28545: Noisy uninitialized warn at opac-MARCdetail.pl line 313

Test plan:
You do not even need a NULL value in a authorised value controlled
item field, a zero in damaged or withdrawn is enough to trigger the
warnings. (Because only the 1 is linked to an authvalue.)

Check your plack-opac-error.log before and after applying this change.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Without the patch I had at least four warnings per item: withdrawn,
lost, damaged and notforloan.

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 Nick Clemens (kidclamp) 2021-06-18 15:38:18 UTC
Created attachment 122164 [details] [review]
Bug 28545: Noisy uninitialized warn at opac-MARCdetail.pl line 313

Test plan:
You do not even need a NULL value in a authorised value controlled
item field, a zero in damaged or withdrawn is enough to trigger the
warnings. (Because only the 1 is linked to an authvalue.)

Check your plack-opac-error.log before and after applying this change.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Without the patch I had at least four warnings per item: withdrawn,
lost, damaged and notforloan.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 5 Jonathan Druart 2021-06-21 10:06:55 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 6 Kyle M Hall (khall) 2021-07-02 13:05:50 UTC
Pushed to 21.05.x for 21.05.02
Comment 7 Fridolin Somers 2021-07-10 02:48:12 UTC
Note that behavior in staff interface in catalogue/MARCdetail.pl is different :
$item->{ $subf[$i][0] } .= GetAuthorisedValueDesc( $field->tag(), $subf[$i][0], $subf[$i][1], '', $tagslib) || $subf[$i][1];
Comment 8 Fridolin Somers 2021-07-10 02:48:41 UTC
Pushed to 20.11.x for 20.11.08
Comment 9 Victor Grousset/tuxayo 2021-07-11 02:33:39 UTC
Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed.