Description
Nick Clemens (kidclamp)
2021-05-12 11:46:26 UTC
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? 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 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 Created attachment 150583 [details] [review] 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 Created attachment 150584 [details] [review] Bug 28328: DBIC schema changes Created attachment 150585 [details] [review] Bug 28328: Adjust tests Created attachment 150586 [details] [review] 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> Created attachment 150587 [details] [review] Bug 28328: DBIC schema changes Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 150588 [details] [review] Bug 28328: Adjust tests Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 151020 [details] [review] 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> Created attachment 151021 [details] [review] Bug 28328: DBIC schema changes Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 151022 [details] [review] Bug 28328: Adjust tests Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> All working as described and fixes the issue. Passing QA Pushed to master for 23.05. Nice work everyone, thanks! Many hands makes light work, thankyou everyone! Pushed to 22.11.x for the next release (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. *** Bug 30896 has been marked as a duplicate of this bug. *** |