| Summary: | searchResults explodes if biblio record has been deleted | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
| Component: | Searching | Assignee: | Jonathan Druart <jonathan.druart> |
| Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
| Severity: | major | ||
| Priority: | P5 - low | CC: | andrew, kyle, nick, victor |
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Crowdfunding goal: | 0 |
| Patch complexity: | --- | Documentation contact: | |
| Documentation submission: | Text to go in the release notes: | ||
| Version(s) released in: |
21.11.00,21.05.15
|
Circulation function: | |
| Bug Depends on: | 3142 | ||
| Bug Blocks: | |||
| Attachments: | Bug 29374: Don't crash if search engine returns a deleted record | ||
Created attachment 127096 [details] [review] Bug 29374: Don't crash if search engine returns a deleted record Pushed to master for 21.11, thanks to everybody involved! *** Bug 30386 has been marked as a duplicate of this bug. *** Pushed to 21.05.x for 21.05.15 |
From commit 1ad0e172cddce560afcc23579948d0c4a1eca71c Bug 3142: Use filter_by_for_holds where holdability is calculated + $can_place_holds = $biblio_object->items->filter_by_for_hold()->count; This is exploding early in C4::Search::searchResults if the record is indexed but deleted from the DB. Can't call method "items" on an undefined value at /kohadevbox/koha/C4/Search.pm line 2000 C4::Search::searchResults('HASH(0x55dc9a4076c0)', 'kw,wrdl: d', 432, 20, 0, undef, 'ARRAY(0x55dc9a3757e8)', 'HASH(0x55dc99f94a50)') called at /kohadevbox/koha/opac/opac-search.pl line 613