From 32fab74b980b00cdc7020b44e274b95619dc9166 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Demians?= Date: Fri, 5 Oct 2012 10:45:18 +0200 Subject: [PATCH] Bug 1963 Problem with deleted biblio in a virtual shelf This bug reappear in HEAD/3.8. When trying to display a virtual shelf (list) containing a deleted biblio, this error message is displayed: Software error: Can't call method "field" on an undefined value at ....C4/Koha.pm line 1231. This fix modify SQL query retrieving biblios, just skipping records from virtual shelf table with no linked record in biblio table: LEFT JOIN replace with JOIN. Signed-off-by: Kyle M Hall Signed-off-by: Paul Poulain --- C4/VirtualShelves.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/VirtualShelves.pm b/C4/VirtualShelves.pm index 8c0b15e275..90a00a580e 100644 --- a/C4/VirtualShelves.pm +++ b/C4/VirtualShelves.pm @@ -267,7 +267,7 @@ sub GetShelfContents { " SELECT vc.biblionumber, vc.shelfnumber, vc.dateadded, itemtypes.*, biblio.*, biblioitems.itemtype, biblioitems.publicationyear as year, biblioitems.publishercode, biblioitems.place, biblioitems.size, biblioitems.pages FROM virtualshelfcontents vc - LEFT JOIN biblio ON vc.biblionumber = biblio.biblionumber + JOIN biblio ON vc.biblionumber = biblio.biblionumber LEFT JOIN biblioitems ON biblio.biblionumber = biblioitems.biblionumber LEFT JOIN itemtypes ON biblioitems.itemtype = itemtypes.itemtype WHERE vc.shelfnumber=? "; -- 2.39.5