From: Frédéric Demians Date: Fri, 5 Oct 2012 08:45:18 +0000 (+0200) Subject: Bug 1963 Problem with deleted biblio in a virtual shelf X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=32fab74b980b00cdc7020b44e274b95619dc9166;p=koha.git 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 --- 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=? ";