Bug 30147 - OpacBrowseResults causing error on detail page
Summary: OpacBrowseResults causing error on detail page
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Fridolin Somers
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-21 20:37 UTC by Katrin Fischer
Modified: 2022-12-12 21:24 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.05.00,21.11.04


Attachments
Bug 30147: Fix modules usage in opac-detail.pl (1.19 KB, patch)
2022-02-25 00:32 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 30147: Fix modules usage in opac-detail.pl (1.56 KB, patch)
2022-02-26 16:24 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 30147: Fix modules usage in opac-detail.pl (1.62 KB, patch)
2022-03-01 15:03 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2022-02-21 20:37:59 UTC
On the ktd sample database when trying to go to the detail page from the result list:

Undefined subroutine &CGI::Compile::ROOT::kohadevbox_koha_opac_opac_2ddetail_2epl::searchResults called at /kohadevbox/koha/opac/opac-detail.pl line 260

Turning off OpacBrowseResults makes the error disappear.
Comment 1 Fridolin Somers 2022-02-25 00:32:20 UTC
Created attachment 131096 [details] [review]
Bug 30147: Fix modules usage in opac-detail.pl

On the ktd sample database when trying to go to the detail page from the result list:
Undefined subroutine &CGI::Compile::ROOT::kohadevbox_koha_opac_opac_2ddetail_2epl::searchResults called at /kohadevbox/koha/opac/opac-detail.pl line 260
Turning off OpacBrowseResults makes the error disappear.

In opac-detail.pl, use C4::Search is missing searchResults and getRecords
Comment 2 Katrin Fischer 2022-02-26 16:19:41 UTC
Not a very generalized test plan yet, but what triggers it for me:

* Search for 'e' in simple search on the OPAC
* Go to page 10 using the link in the paging on top of results
* Go to any detail page from here - boom!
Comment 3 Katrin Fischer 2022-02-26 16:24:45 UTC
Created attachment 131138 [details] [review]
Bug 30147: Fix modules usage in opac-detail.pl

On the ktd sample database when trying to go to the detail page from the result list:
Undefined subroutine &CGI::Compile::ROOT::kohadevbox_koha_opac_opac_2ddetail_2epl::searchResults called at /kohadevbox/koha/opac/opac-detail.pl line 260
Turning off OpacBrowseResults makes the error disappear.

In opac-detail.pl, use C4::Search is missing searchResults and getRecords

To test:
- Search for something that gives several result pages in OPAC, example: e
- Switch to one of the last pages using link on top of results, example: 10
- Open any of the records listed in detail view
- Verify that the error is shown
- Apply patch and repeat, error is gone and browsing behaves as expected

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Martin Renvoize 2022-03-01 15:03:29 UTC
Created attachment 131186 [details] [review]
Bug 30147: Fix modules usage in opac-detail.pl

On the ktd sample database when trying to go to the detail page from the result list:
Undefined subroutine &CGI::Compile::ROOT::kohadevbox_koha_opac_opac_2ddetail_2epl::searchResults called at /kohadevbox/koha/opac/opac-detail.pl line 260
Turning off OpacBrowseResults makes the error disappear.

In opac-detail.pl, use C4::Search is missing searchResults and getRecords

To test:
- Search for something that gives several result pages in OPAC, example: e
- Switch to one of the last pages using link on top of results, example: 10
- Open any of the records listed in detail view
- Verify that the error is shown
- Apply patch and repeat, error is gone and browsing behaves as expected

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 5 Martin Renvoize 2022-03-01 15:03:50 UTC
Another trivial fix, well spotted.

PQA
Comment 6 Fridolin Somers 2022-03-04 02:12:36 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄
Comment 7 Kyle M Hall 2022-03-04 15:21:31 UTC
Pushed to 21.11.x for 21.11.04
Comment 8 Andrew Fuerste-Henry 2022-03-20 16:01:09 UTC
This seems like it depends on bug 11175? Or at least needs a rebase due to changes there. Not backporting to 21.05, request if needed.