From 63611e5b582d2e577cb4a08e9a63896c6f97ef5f Mon Sep 17 00:00:00 2001 From: Chris Mathevet Date: Mon, 25 May 2026 08:54:59 -0400 Subject: [PATCH] Bug 42666: Parse kohaTable pageLength setting to int Test plan : 01 - Clear your browser's local storage 02 - Go to Administration > Item types 03- You need to have more than 10 item types, add some if needed 04 - Observe "Showing 1 to 010 of XX" on top of the table 05 - Click on "next" button at the bottom of the table 06 - Nothing happens 07 - Go to Administration > Patron categories 08 - You need to have more than 20 patron categories, add some if needed 09 - Observe "Showing 1 to 020 of XX" on top of the table 10 - Click on "next" button at the bottom of the table 11 - Nothing happens 12 - Apply patch 13 - Clear your browser's local storage 14 - Repeat 2-5 and 7-10, observe that the leading 0 is gone, and that the "next" button works Signed-off-by: David Nind Signed-off-by: Jonathan Druart Signed-off-by: Lucas Gass --- koha-tmpl/intranet-tmpl/prog/js/datatables.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/js/datatables.js index 79a0cf0cd9..cfa733a33f 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js +++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js @@ -1497,7 +1497,7 @@ function update_search_description( table_settings["default_display_length"] != null ) { settings["pageLength"] = - table_settings["default_display_length"]; + parseInt(table_settings["default_display_length"], 10); } if ( table_settings.hasOwnProperty("default_sort_order") &&