If you select multiple titles to place on hold in the OPAC and at least one of them has no items you will get a nasty error: Can't call method "field" on an undefined value at C4/Items.pm line 1398.
Created attachment 17874 [details] [review] Bug 10169 [Incomplete] Software error if one of multiple titles selected for hold in the OPAC has no items This patch contains changes suggested by Jared on IRC. This eliminates the ugly error but raises a new problem: The 'Place hold' screen is now blank except for a warning: "ERROR: No biblio record found for biblionumber 5638." The warning is triggered by the variable "bad_biblionumber," set here (opac-reserve.pl lines 362+): # Get relevant biblio data. my $biblioData = $biblioDataHash{$biblioNum}; if (! $biblioData) { $template->param(message=>1, bad_biblionumber=>$biblioNum); &get_out($query, $cookie, $template->output); } I assume this is proper error-handling in the case of placing a single hold, but has never been revised to accommodate multiple holds? Not sure where to go next with it.
I can not reproduce on current master 3.19.00.000 How I tested: - Log in to Opac - Do a search that has biblios with an dwihtout items as result - Select one with items and two without items and place hold. Result (OK): -------------- Confirm holds for: xxxxx (x) Faust — Part 1 , by Goethe, Johann Wolfgang von, 1749-1832 No available items. Place a hold on The German Classics of the Nineteenth and Twentieth Centuries, Volume 01 Masterpieces of German Literature Translated into English. Holds and priority: 1 Pick up location: Show more options West-östlicher Divan , by Goethe, Johann Wolfgang von, 1749-1832 No available items. ---------------
Confirmed, this is fixed.