Acquisitions module internal server error
I'm trying out the Acquisitions module in 16.11 in two instances. One with many test acquisitions done in the past (First instance) while the other instance almost clean slate acquisitions (Second instance). I get internal server error in the first instance whenever saving an order for a basket with the following Acqui System Preferences: AcqCreateItem is set to 'placing an order' and UniqueItemFields is set to either blank or 'barcode'. Clicking the 'Back' button will let me go back to the last interface I was in and clicking 'Save' again will let me save the order and once in the 'Basket' interface, I get to see two orders of previously processed orders (same order but different No.), see image below. <http://koha.1045719.n5.nabble.com/file/n5913371/acqui_internal_server_error.png> I get this error when barcode is not filled up in the items during order creation. However, in the second instance, this work perfectly fine. With same system preference, the order is saved even though a barcode was not entered. I'm trying to find the error log for this but could not find it in the intranet-error-log. By the way, plack is enabled for the first instance, while the second instance it isn't. Further looking at the plack-error log, it seems it really is related with the barcode: No existing hbyymmincr barcodes found. Reverting to initial value. at /usr/share/koha/lib/C4/Barcodes/hbyymmincr.pm line 62. DBD::mysql::st execute failed: Duplicate entry 'INSTI-16120002' for key 'itembarcodeidx' [for Statement "INSERT INTO items SET... Now, my question is, with all that I've written above, I guess it really is the case in the order creation in Acquisitions module that if Acqcreateitem is set to 'placing an order', a barcode should be filled up before saving? I just got two different results in different instances in same server. But my deduction tells me it's in the Plack. Should there be a notification error for this? To prevent bad data in the future. That's all, Cheers and have a nice day y'all! -- View this message in context: http://koha.1045719.n5.nabble.com/Acquisitions-module-internal-server-error-... Sent from the Koha-general mailing list archive at Nabble.com.
Addendum: I enabled plack in the other instance. Tested adding an order not filling up barcodes in the items, I was able to save the record and did not get internal server error. However, I got two records of the same order saved. And also, I enabled generate barcodes automatically - generated in the form 1,2,3 and the other one branchcode in the system preference for both, that could be the reason why. When I disabled barcodes not generating automatically in the system preference in the second instance, I did not experienced the error. So, my hunch is if generating barcodes automatically is set, the error will be had if the barcode is already existing. A further delve into the system then why the barcode generated is starting at say INSTI-00002 should be taken into account. Probably the increment settings have to be adjusted. -- View this message in context: http://koha.1045719.n5.nabble.com/Acquisitions-module-internal-server-error-... Sent from the Koha-general mailing list archive at Nabble.com.
Hi, could you turn this into a bug report on https://bugs.koha-community.org with steps on how to reproduce the issue please? Thx! Katrin Am 07.12.2016 um 06:42 schrieb schnydszch:
Addendum: I enabled plack in the other instance. Tested adding an order not filling up barcodes in the items, I was able to save the record and did not get internal server error. However, I got two records of the same order saved. And also, I enabled generate barcodes automatically - generated in the form 1,2,3 and the other one branchcode in the system preference for both, that could be the reason why. When I disabled barcodes not generating automatically in the system preference in the second instance, I did not experienced the error. So, my hunch is if generating barcodes automatically is set, the error will be had if the barcode is already existing. A further delve into the system then why the barcode generated is starting at say INSTI-00002 should be taken into account. Probably the increment settings have to be adjusted.
-- View this message in context: http://koha.1045719.n5.nabble.com/Acquisitions-module-internal-server-error-... Sent from the Koha-general mailing list archive at Nabble.com. _______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha
Hi Katrin! I'm trying to replicate this in a new instance, I've deleted the last test instance, I can't seem to replicate. Will try again if I get access to the database of the last instance I tested. Cheers! :) -- View this message in context: http://koha.1045719.n5.nabble.com/Acquisitions-module-internal-server-error-... Sent from the Koha-general mailing list archive at Nabble.com.
Before I add this in Koha bugs, I forgot to mention that I had a plugin for barcode which is basically barcode.pl but commenting the following line: ($args{year}, $args{mon}, $args{day}) = split('-', output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }));which is to not add date in the barcode in option 'hbyymmincr' or 'generated in the form yymm0001.I returned the original barcode.pl file to check if I will still get the error message, and Yes I still got the error message. A snippet on the plack-error log:No existing hbyymmincr barcodes found. Reverting to initial value. at /usr/share/koha/lib/C4/Barcodes/hbyymmincr.pm line 62.DBD::mysql::st execute failed: Duplicate entry 'DLSU-D16120002' for key 'itembarcodeidx' [for Statement "INSERT INTO items SET biblionumber = ?, biblioitemnumber = ?, barcode = ?, dateaccessioned = ?, booksellerid = ?, homebranch = ?, price = ?, replacementprice = ?, replacementpricedate = ?, datelastborrowed = ?, datelastseen = ?, stack = ?, notforloan = ?, damaged = ?, itemlost = ?, withdrawn = ?, itemcallnumber = ?, coded_location_qualifier = ?, restricted = ?, itemnotes = ?, itemnotes_nonpublic = ?, holdingbranch = ?, paidfor = ?, location = ?, permanent_location = ?, onloan = ?, issues = ?, renewals = ?, reserves = ?, cn_source = ?, cn_sort = ?, ccode = ?, itype = ?, materials = ?, uri = ?, enumchron = ?, more_subfields_xml = ?, copynumber = ?, stocknumber = ?, new_status = ? " with ParamValues: 0="4908", 1='4908', 2="DLSU-D16120002", 3='2016-12-14', 4=undef, 5="DLSU-D", 6=undef, 7=undef, 8='2016-12-14', 9=undef, 10='2016-12-14', 11=undef, 12=0, 13=0, 14=0, 15=0, 16=undef, 17=undef, 18=undef, 19=undef, 20=undef, 21="DLSU-D", 22=undef, 23=undef, 24=undef, 25=undef, 26=undef, 27=undef, 28=undef, 29="lcc", 30='', 31=undef, 32=undef, 33=undef, 34=undef, 35=undef, 36=undef, 37=undef, 38=undef, 39=undef] at /usr/share/koha/lib/C4/Items.pm line 2119.DBD::mysql::st execute failed: Column 'itemnumber' cannot be null [for Statement "INSERT INTO `aqorders_items` ( `itemnumber`, `ordernumber`) VALUES ( ?, ? )" with ParamValues: 0=undef, 1='42'] at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1832.DBIx::Class::Storage::DBI::_dbh_execute(): Column 'itemnumber' cannot be null at /usr/share/koha/lib/Koha/Acquisition/Order.pm line 68Further looking at the plack-error log, this particular snippet in the error log is seen repeatedly when finding this particular barcode "DLSU-D16120002". It seems it's not auto-incrementing and should be as stated in the interface "The autoBarcode system preference is set to hbyymmincr and items with blank barcodes will have barcodes generated upon save to database" I feel that the barcode does not auto-increment in the Acquisitions module for this particular instance. It's just so weird that another Koha instance in that same server can not replicate this use case, also Plack-enabled with hbyymmincr enabled. I'll just add this to the Koha bugs. Thanks and cheers! -- View this message in context: http://koha.1045719.n5.nabble.com/Acquisitions-module-internal-server-error-... Sent from the Koha-general mailing list archive at Nabble.com.
Hi Katrin! I've added this in Koha bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17774. Cheers! -- View this message in context: http://koha.1045719.n5.nabble.com/Acquisitions-module-internal-server-error-... Sent from the Koha-general mailing list archive at Nabble.com.
participants (2)
-
Katrin Fischer -
schnydszch