I have been testing Koha's SIP2 service using both the 3M software and an actual self-check device. When attempting to return an item loaned using the Koha circulation interface through the 3m software I receive a message that communications has failed while the following message appears in my sip.err file: Use of uninitialized value $var in hash element at /usr/share/koha/lib/C4/Context.pm line 1026 Undefined subroutine &C4::Circulation::GetItemnumberFromBarcode called at /usr/share/koha/lib/C4/Circulation.pm line 1541 Note that this error is similar to the one reported in bug 7684 today
This is only triggered if the item needs to be transferred, so will be sporadic. But can be reliably recreated on by returning an item that needs to be transferred.
(In reply to comment #1) > This is only triggered if the item needs to be transferred, so will be > sporadic. But can be reliably recreated on by returning an item that needs > to be transferred. Odd as the item was from branch MAIN and was being returned to branch MAIN -- no other branches currently defined on my test system (and only a small number <25) of items
I have a suspicion this is to do with bug 6875, but I have to go to a user day now so can't investigate more. And it may be checking if it needs transfer. A quick fix ron, change line 1541 to read my $itemnumber = C4::Items::GetItemnumberFromBarcode( $barcode ); instead of my $itemnumber = GetItemnumberFromBarcode( $barcode ); This will work while we track down the root cause and fix it
(In reply to comment #3) > I have a suspicion this is to do with bug 6875, but I have to go to a user > day now so can't investigate more. > > And it may be checking if it needs transfer. A quick fix ron, change line > 1541 to read > > my $itemnumber = C4::Items::GetItemnumberFromBarcode( $barcode ); > > instead of > > my $itemnumber = GetItemnumberFromBarcode( $barcode ); > > This will work while we track down the root cause and fix it Made the change that you suggested at line 1541 Error continues with a slight change in the location Undefined subroutine &C4::Circulation::GetItemnumberFromBarcode called at /usr/share/koha/lib/C4/Circulation.pm line 1563 GetItem is used at that point and a note references the fact that it should work because GetItemnumberFromBarcode worked I will leave this as is for the moment as it may need eyes more familiar with the code than mine.
That should be C4::Items->GetItemnumberFromBarcode not C4::Items::GetItemnumberFromBarcode The latter expects a GetItemnumberFromBarcode.pm file, whereas the former expects a function inside of C4::Items.
(In reply to comment #5) > That should be C4::Items->GetItemnumberFromBarcode not > C4::Items::GetItemnumberFromBarcode > > The latter expects a GetItemnumberFromBarcode.pm file, whereas the former > expects a function inside of C4::Items. Not true. C4::Items::GetItemnumberFromBarcode() calls the GetItemnumberFromBarcode subroutine in C4/Items.pm If you notice Ron's other comment, it is now the same error further in the file.
Anybody has a solution for this bug?? I am experiencing the same error even at Checkout/CheckIn. The connection is closed with the same error : Use of uninitialized value $var in hash element at /home/koha/kohaclone/C4/Context.pm line 1026 Undefined subroutine &C4::Circulation::GetItemnumberFromBarcode called at /home/koha/kohaclone/C4/Circulation.pm line 1541
Sorry the line number is wrong on my previous mail. The correct one is Undefined subroutine &C4::Circulation::GetItemnumberFromBarcode called at /home/koha/kohaclone/C4/Circulation.pm line 671
Hm, this does not sound like a nice bug - I still haven't figured out how to test SIP properly, can someone else take a look maybe?
The call does not occur in current versions of C4::Circulation.pm is this specific to a particular release of 3.8 ? Can someone who can reproduce this try with a later release
Thx Colin.
Fixed in later versions