Bugzilla – Attachment 170769 Details for
Bug 37544
Item table not loading on Normal View, after upgrade
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37544: Prevent the item table to crash if location is not linked with an av cat
Bug-37544-Prevent-the-item-table-to-crash-if-locat.patch (text/plain), 1.77 KB, created by
Jonathan Druart
on 2024-08-27 12:44:18 UTC
(
hide
)
Description:
Bug 37544: Prevent the item table to crash if location is not linked with an av cat
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2024-08-27 12:44:18 UTC
Size:
1.77 KB
patch
obsolete
>From a3eb12c9705eb2b6c01189a8ae96d40176dc4a21 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 27 Aug 2024 14:41:02 +0200 >Subject: [PATCH] Bug 37544: Prevent the item table to crash if location is not > linked with an av cat > >If location (952$c) is not linked with an authorisd value category, the >item table won't load and will crash with "row._strings.location is >undefined" in the JS console. > >Is it mandatory to have it linked? >--- > .../en/includes/html_helpers/tables/items/catalogue_detail.inc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc >index 02b6edfa0e7..9af11948d81 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc >@@ -369,7 +369,7 @@ > [%# If permanent location is defined, show description or code and %] > [%# display current location in parentheses. If not, display current location. %] > [%# Note that permanent location is a code, and location may be an authval. %] >- let loc_str = row._strings.location.str; >+ let loc_str = row._strings.location ? row._strings.location.str : row.location; > if ( row.permanent_location && row.permanent_location != row.location ) { > let permanent_loc_str = av_loc.get(row.permanent_location); > nodes += '%s (%s)'.format(escape_str(permanent_loc_str), escape_str(loc_str)); >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 37544
:
169943
|
169965
|
170006
|
170131
| 170769 |
170770