[Bug 28328] New: Editing a record can cause an ISE if data too long for column
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28328 Bug ID: 28328 Summary: Editing a record can cause an ISE if data too long for column Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl Like bug 26518, but for ModBiblio To recreate: 1 - Edit a record in the staff client 2 - In MARC21 edit the 010a/LCCN field wih: ThisisgoingtobetoomanycharactersfortheLCCNfield 3 - Save the record 4 - ISE: C4::Biblio::_koha_modify_biblioitem_nonmarc(): DBI Exception: DBD::mysql::st execute failed: Data too long for column 'lccn' at row 1 [for Statement "UPDATE biblioitems SET biblionumber = ?, volume = ?, number = ?, itemtype = ?, isbn = ?, issn = ?, publicationyear = ?, publishercode = ?, volumedate = ?, volumedesc = ?, collectiontitle = ?, collectionissn = ?, collectionvolume= ?, editionstatement= ?, editionresponsibility = ?, illus = ?, pages = ?, notes = ?, size = ?, place = ?, lccn = ?, url = ?, cn_source = ?, cn_class = ?, cn_item = ?, cn_suffix = ?, cn_sort = ?, totalissues = ?, ean = ?, agerestriction = ? where biblioitemnumber = ? " with ParamValues: 0="4239", 1=undef, 2=undef, 3="BK", 4="0887080189", 5=undef, 6=undef, 7="Neugebauer Press USA ; | Distributed by Alphabet Press,", 8=undef, 9=undef, 10=undef, 11=undef, 12=undef, 13=undef, 14=undef, 15="col. ill. ;", 16="[30] p. :", 17=undef, 18="30 cm.", 19="[S.l.] : | Natick, MA :", 20="83181009sdhgaethq45y245y24thsadhgahq", 21=undef, 22="ddc", 23=undef, 24=undef, 25=undef, 26='', 27=undef, 28=undef, 29=undef, 30='4239'] at /kohadevbox/koha/C4/Biblio.pm line 384 at /usr/share/perl5/DBIx/Class/Exception.pm line 77 This also kills the linker script if a bib with too long lccn is encountered -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28328 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=26518 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28328 --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- What would be the best solution here? I think we could limit the max size of 010a via the frameworks. But if the LCCN really can be longer than we give them space for now, we should probably change the data type of the column? -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28328 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=30896 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28328 Philip Orr <philip.orr@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |philip.orr@lmscloud.de --- Comment #2 from Philip Orr <philip.orr@lmscloud.de> --- I got the same error in the OPAC when adding a purchase suggestion from an already existing title. To reproduce: 1 - Open a record in the OPAC that has too many characters in the ISBN field, e.g. "Ruby cookbook" 2 - Click on "Suggest for purchase" 3 - Click on "Submit your suggestion" 4 - ISE: DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Data too long for column 'isbn' at row 1 at /kohadevbox/koha/Koha/Object.pm line 170 at /usr/share/perl5/DBIx/Class/Exception.pm line 77 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28328 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bibliothek@th-wildau.de -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28328 --- Comment #3 from Jan Kissig <bibliothek@th-wildau.de> --- The same problem for columns publishercode or place obtained from MARC 264$b and $a or 260$a and $b to reproduce 1 - edit or add new biblio 2 - in 264$a enter f.e. "1averylongtextaverylongtextaverylongtext42averylongtextaverylongtextaverylongtext84 | 2averylongtextaverylongtextaverylongtext42averylongtextaverylongtextaverylongtext84 | 3averylongtextaverylongtextaverylongtext42averylongtextaverylongtextaverylongtext847" 3 - fill in other mandatory fields 4 - save /var/log/koha/kohadev/plack-intranet-error.log says [2023/04/12 08:27:52] [WARN] DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Data too long for column 'place' at row 1 at /kohadevbox/koha/Koha/Object.pm line 176 As 260/264 $a and $c are repeatable fields, which get joined, it is not uncommon that they exceed the maximal length of 256 in some of my records -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28328 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28328 --- Comment #4 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 150583 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150583&action=edit Bug 28328: Extend biblioitems.lccn to longtext Same sa issn and isbn, we want lccn to allow longer values. Test plan: Run the updatedatabase script to modify the DB structure restart_all Edit a bibliographic record and enter a long (more than 25 chars) lccn Save -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28328 --- Comment #5 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 150584 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150584&action=edit Bug 28328: DBIC schema changes -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28328 --- Comment #6 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 150585 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150585&action=edit Bug 28328: Adjust tests -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28328 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart+koha@gmail. |ity.org |com CC| |jonathan.druart+koha@gmail. | |com -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28328 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28328 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #150583|0 |1 is obsolete| | --- Comment #7 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 150586 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150586&action=edit Bug 28328: Extend biblioitems.lccn to longtext Same sa issn and isbn, we want lccn to allow longer values. Test plan: Run the updatedatabase script to modify the DB structure restart_all Edit a bibliographic record and enter a long (more than 25 chars) lccn Save Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28328 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #150584|0 |1 is obsolete| | --- Comment #8 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 150587 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150587&action=edit Bug 28328: DBIC schema changes Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28328 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #150585|0 |1 is obsolete| | --- Comment #9 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 150588 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150588&action=edit Bug 28328: Adjust tests Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28328 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #150586|0 |1 is obsolete| | --- Comment #10 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 151020 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=151020&action=edit Bug 28328: Extend biblioitems.lccn to longtext Same sa issn and isbn, we want lccn to allow longer values. Test plan: Run the updatedatabase script to modify the DB structure restart_all Edit a bibliographic record and enter a long (more than 25 chars) lccn Save Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28328 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #150587|0 |1 is obsolete| | --- Comment #11 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 151021 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=151021&action=edit Bug 28328: DBIC schema changes Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28328 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #150588|0 |1 is obsolete| | --- Comment #12 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 151022 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=151022&action=edit Bug 28328: Adjust tests Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28328 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |martin.renvoize@ptfs-europe | |.com --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- All working as described and fixes the issue. Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28328 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |23.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28328 --- Comment #14 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.05. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28328 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|23.05.00 |23.05.00,22.11.06 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28328 --- Comment #15 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Many hands makes light work, thankyou everyone! Pushed to 22.11.x for the next release -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28328 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=34029 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28328 --- Comment #16 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Jan Kissig from comment #3)
The same problem for columns publishercode or place obtained from MARC 264$b and $a or 260$a and $b
to reproduce 1 - edit or add new biblio 2 - in 264$a enter f.e. "1averylongtextaverylongtextaverylongtext42averylongtextaverylongtextaverylon gtext84 | 2averylongtextaverylongtextaverylongtext42averylongtextaverylongtextaverylong text84 | 3averylongtextaverylongtextaverylongtext42averylongtextaverylongtextaverylong text847" 3 - fill in other mandatory fields 4 - save
/var/log/koha/kohadev/plack-intranet-error.log says [2023/04/12 08:27:52] [WARN] DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Data too long for column 'place' at row 1 at /kohadevbox/koha/Koha/Object.pm line 176
As 260/264 $a and $c are repeatable fields, which get joined, it is not uncommon that they exceed the maximal length of 256 in some of my records
Hi Jan, please see bug 34029. Trying to get rid of those problems for good. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28328 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #17 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- *** Bug 30896 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org