When creating an item in the staff client Koha does not complain if I paste in (or type) a URI that is longer than 255 bytes. When I save the item, the URI is silently truncated to 255 bytes. Here's a sample URI, 500 bytes long, that you can use to reproduce the bug: http://example.com/harumvelitiustovelitofficiaquisnihilconsecteturisteeumautempraesentiumnamplaceatexcepturiautdolorplaceatvoluptatumvoluptatibussedetquamminimailloporropossimusnecessitatibusharumdolorumvoluptasveritatisetsuntsintsedlaboretemporaquasquietvoluptasexplicabosuntautdeseruntquisestvoluptatemveroveronecessitatibusrecusandaedebitiscumquemagnialiquamvoluptatenequeconsequaturnumquamomnisdignissimosaccusantiumquoutquodutsuscipitautemquiaomnisdelenitipraesentiumenimtotamidlaborumitaqueporr
I do not know if I am going to address you concern here but I found a bug. There is a "max length" value you can defined at framework level, to limit the size of the input. But it is not taken into account on the add/edit item form. It is a regression that has been introduced by commit 47d2de9c024bfb93d56184f298f334b20685cd86 Bug 12176: Remove HTML from additem.pl
Created attachment 76578 [details] [review] Bug 21009: Fix max length of inputs on editing/adding items There is a "max length" value you can define at framework level to limit the size of the input. But it is not taken into account on the add/edit item form. It is a regression that has been introduced by commit 47d2de9c024bfb93d56184f298f334b20685cd86 Bug 12176: Remove HTML from additem.pl max_length vs maxlength Test plan: - Define a maximum length for an item subfield - Add or edit an item => Without this patch the maxlength attribute of the inputs are not defined (maxlength="") => With this fix you will see the maxlength attributes correctly set with the value you defined in the framework Note: We could/should set this value to the size of the DB column when mapped For instance 952$u is mapped with items.uri, which is a varchar(255). This length restriction should done at framework level
Created attachment 76749 [details] [review] Bug 21009: Fix max length of inputs on editing/adding items There is a "max length" value you can define at framework level to limit the size of the input. But it is not taken into account on the add/edit item form. It is a regression that has been introduced by commit 47d2de9c024bfb93d56184f298f334b20685cd86 Bug 12176: Remove HTML from additem.pl max_length vs maxlength Test plan: - Define a maximum length for an item subfield - Add or edit an item => Without this patch the maxlength attribute of the inputs are not defined (maxlength="") => With this fix you will see the maxlength attributes correctly set with the value you defined in the framework Note: We could/should set this value to the size of the DB column when mapped For instance 952$u is mapped with items.uri, which is a varchar(255). This length restriction should done at framework level Signed-off-by: Pierre-Luc Lapointe <pierreluc.lapointe@inLibro.com>
Created attachment 76751 [details] [review] Bug 21009: Fix max length of inputs on editing/adding items There is a "max length" value you can define at framework level to limit the size of the input. But it is not taken into account on the add/edit item form. It is a regression that has been introduced by commit 47d2de9c024bfb93d56184f298f334b20685cd86 Bug 12176: Remove HTML from additem.pl max_length vs maxlength Test plan: - Define a maximum length for an item subfield - Add or edit an item => Without this patch the maxlength attribute of the inputs are not defined (maxlength="") => With this fix you will see the maxlength attributes correctly set with the value you defined in the framework Note: We could/should set this value to the size of the DB column when mapped For instance 952$u is mapped with items.uri, which is a varchar(255). This length restriction should done at framework level Signed-off-by: Pierre-Luc Lapointe <pierreluc.lapointe@inLibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Awesome work all! Pushed to master for 18.11
Pushed to 18.05.x for 18.05.02
Pushed to 17.11.x for 17.11.09