From a963c6bc14253d736ccfa0a3618d5d6e0e0ed955 Mon Sep 17 00:00:00 2001 From: Thibaud Guillot Date: Wed, 28 Feb 2024 16:20:10 +0100 Subject: [PATCH] Bug 36196: Handling NULL data on ajax call Test plan: 1) Update some data in your cities table, sample for one send: "UPDATE cities SET city_state=NULL WHERE cityid=" 2) Go on "/cgi-bin/koha/admin/cities.pl" and wait a entire life :) 3) Apply this patch 4) Rebuild your po files if needed 5) Reload the same page and now you get normally the datatable Sponsored by: BibLibre Signed-off-by: Lucas Gass Signed-off-by: Martin Renvoize (cherry picked from commit e0856d0db648766ba1d65a4f784983a416ac4a35) Signed-off-by: Lucas Gass --- koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt index 5de5ef1162..2243f74ff3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt @@ -243,7 +243,11 @@ "targets": [0,1,2,3,4], "render": function (data, type, row, meta) { if ( type == 'display' ) { - return data.escapeHtml(); + if ( data != null ) { + return data.escapeHtml(); + } else { + return ""; + } } return data; } -- 2.39.5