[Koha] Error while creating new label batch
dnj
deneve.jan at sinthendrik.be
Tue Nov 27 10:10:41 NZDT 2018
When trying to create a new label batch and filling it with items (either by
barcode or itemnumbers) I'm getting the following error:
WARNING: An error was encountered: Item(s) not added to batch 3. Please have
your system administrator check the error log for details.
This happens when I'm pasting 1 or more barcodes in the textfield for adding
items. It also happpens if I past 1 or more itemnummbers in that text field.
It's a bit unexpected because I was able to create 1 label batch 1 month
ago, but if I try to use the same procedure now I get the error.
When I check the logs in intranet-error.log I find the following errors
saying there was a problem with inserting the items in the batch in the
database.
[Mon Nov 26 15:42:01.661987 2018] [cgi:error] [pid 10354] [client
192.168.12.12:51964] AH01215: [Mon Nov 26 15:42:01 2018]
label-edit-batch.pl: DBD::mysql::st execute failed: Cannot add or update a
child row: a foreign key constraint fails
(`koha_bibliotheek`.`creator_batches`, CONSTRAINT `creator_batches_ibfk_3`
FOREIGN KEY (`item_number`) REFERENCES `itemsOUD` (`itemnumber`) ON DELETE
CASCADE) [for Statement "INSERT INTO creator_batches (batch_id, item_number,
branch_code, creator) VALUES (?,?,?,?);" with ParamValues: 0='3', 1='230',
2="SH", 3='Labels'] at /usr/share/koha/lib/C4/Creators/Batch.pm line 69.:
/usr/share/koha/intranet/cgi-bin/labels/label-edit-batch.pl, referer:
http://bibliotheek-admin.sinthendrik.be/cgi-bin/koha/labels/label-edit-batch.pl
[Mon Nov 26 15:42:01.662619 2018] [cgi:error] [pid 10354] [client
192.168.12.12:51964] AH01215: [Mon Nov 26 15:42:01 2018]
label-edit-batch.pl: Database returned the following error on attempted
INSERT: Cannot add or update a child row: a foreign key constraint fails
(`koha_bibliotheek`.`creator_batches`, CONSTRAINT `creator_batches_ibfk_3`
FOREIGN KEY (`item_number`) REFERENCES `itemsOUD` (`itemnumber`) ON DELETE
CASCADE) at /usr/share/koha/lib/C4/Creators/Batch.pm line 71.:
/usr/share/koha/intranet/cgi-bin/labels/label-edit-batch.pl, referer:
http://bibliotheek-admin.sinthendrik.be/cgi-bin/koha/labels/label-edit-batch.pl
[Mon Nov 26 15:42:01.664480 2018] [cgi:error] [pid 10354] [client
192.168.12.12:51964] AH01215: [Mon Nov 26 15:42:01 2018]
label-edit-batch.pl: DBD::mysql::st execute failed: Cannot add or update a
child row: a foreign key constraint fails
(`koha_bibliotheek`.`creator_batches`, CONSTRAINT `creator_batches_ibfk_3`
FOREIGN KEY (`item_number`) REFERENCES `itemsOUD` (`itemnumber`) ON DELETE
CASCADE) [for Statement "INSERT INTO creator_batches (batch_id, item_number,
branch_code, creator) VALUES (?,?,?,?);" with ParamValues: 0=3, 1='235',
2="SH", 3='Labels'] at /usr/share/koha/lib/C4/Creators/Batch.pm line 69.:
/usr/share/koha/intranet/cgi-bin/labels/label-edit-batch.pl, referer:
http://bibliotheek-admin.sinthendrik.be/cgi-bin/koha/labels/label-edit-batch.pl
[Mon Nov 26 15:42:01.665053 2018] [cgi:error] [pid 10354] [client
192.168.12.12:51964] AH01215: [Mon Nov 26 15:42:01 2018]
label-edit-batch.pl: Database returned the following error on attempted
INSERT: Cannot add or update a child row: a foreign key constraint fails
(`koha_bibliotheek`.`creator_batches`, CONSTRAINT `creator_batches_ibfk_3`
FOREIGN KEY (`item_number`) REFERENCES `itemsOUD` (`itemnumber`) ON DELETE
CASCADE) at /usr/share/koha/lib/C4/Creators/Batch.pm line 71.:
/usr/share/koha/intranet/cgi-bin/labels/label-edit-batch.pl, referer:
http://bibliotheek-admin.sinthendrik.be/cgi-bin/koha/labels/label-edit-batch.pl
[Mon Nov 26 15:42:01.667071 2018] [cgi:error] [pid 10354] [client
192.168.12.12:51964] AH01215: [Mon Nov 26 15:42:01 2018]
label-edit-batch.pl: DBD::mysql::st execute failed: Cannot add or update a
child row: a foreign key constraint fails
(`koha_bibliotheek`.`creator_batches`, CONSTRAINT `creator_batches_ibfk_3`
FOREIGN KEY (`item_number`) REFERENCES `itemsOUD` (`itemnumber`) ON DELETE
CASCADE) [for Statement "INSERT INTO creator_batches (batch_id, item_number,
branch_code, creator) VALUES (?,?,?,?);" with ParamValues: 0=3, 1='231',
2="SH", 3='Labels'] at /usr/share/koha/lib/C4/Creators/Batch.pm line 69.:
/usr/share/koha/intranet/cgi-bin/labels/label-edit-batch.pl, referer:
http://bibliotheek-admin.sinthendrik.be/cgi-bin/koha/labels/label-edit-batch.pl
[Mon Nov 26 15:42:01.667630 2018] [cgi:error] [pid 10354] [client
192.168.12.12:51964] AH01215: [Mon Nov 26 15:42:01 2018]
label-edit-batch.pl: Database returned the following error on attempted
INSERT: Cannot add or update a child row: a foreign key constraint fails
(`koha_bibliotheek`.`creator_batches`, CONSTRAINT `creator_batches_ibfk_3`
FOREIGN KEY (`item_number`) REFERENCES `itemsOUD` (`itemnumber`) ON DELETE
CASCADE) at /usr/share/koha/lib/C4/Creators/Batch.pm line 71.:
/usr/share/koha/intranet/cgi-bin/labels/label-edit-batch.pl, referer:
http://bibliotheek-admin.sinthendrik.be/cgi-bin/koha/labels/label-edit-batch.pl
Any idea what is going wrong and/or how to solve this?
Thanks in advance!
Jan.
--
Sent from: http://koha.1045719.n5.nabble.com/Koha-general-f3047918.html
More information about the Koha
mailing list