Bug 30426 - suggestion service missing Auth and Output imports
Summary: suggestion service missing Auth and Output imports
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: David Cook
QA Contact: Testopia
URL:
Keywords:
Depends on: 17600
Blocks:
  Show dependency treegraph
 
Reported: 2022-03-31 23:02 UTC by David Cook
Modified: 2022-12-12 21:24 UTC (History)
2 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.05
Circulation function:


Attachments
Bug 30426: Add missing C4::Auth and C4::Output imports (893 bytes, patch)
2022-03-31 23:04 UTC, David Cook
Details | Diff | Splinter Review
Bug 30426: Add missing C4::Auth and C4::Output imports (1.28 KB, patch)
2022-04-04 11:36 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 30426: Add missing C4::Auth and C4::Output imports (1.35 KB, patch)
2022-04-05 12:20 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Cook 2022-03-31 23:02:12 UTC
While most scripts have been updated to import specific functions from C4::Auth and C4::Output, /opac/svc/suggestion missed those, which means calls to it generate 500 errors.
Comment 1 David Cook 2022-03-31 23:04:04 UTC
Created attachment 132813 [details] [review]
Bug 30426: Add missing C4::Auth and C4::Output imports

This patch adds missing function imports for C4::Auth and C4::Output
in the opac/svc/suggestion script.
Comment 2 David Cook 2022-03-31 23:05:53 UTC
Test plan:

1. Go to http://localhost:8081/cgi-bin/koha/admin/didyoumean.pl
2. Turn on some plugins
3. Go to http://localhost:8080/cgi-bin/koha/opac-search.pl?idx=&q=test&weight_search=1
4. Note in your browser's Network tab that the call to http://localhost:8080/cgi-bin/koha/svc/suggestion?render=stub&q=test generates a 200 response instead of a 500 error
Comment 3 Owen Leonard 2022-04-04 11:36:55 UTC
Created attachment 132929 [details] [review]
Bug 30426: Add missing C4::Auth and C4::Output imports

This patch adds missing function imports for C4::Auth and C4::Output
in the opac/svc/suggestion script.

Test plan:

1. Go to http://localhost:8081/cgi-bin/koha/admin/didyoumean.pl
2. Turn on some plugins
3. Go to http://localhost:8080/cgi-bin/koha/opac-search.pl?idx=&q=test&weight_search=1
4. Note in your browser's Network tab that the call to
   http://localhost:8080/cgi-bin/koha/svc/suggestion?render=stub&q=test
   generates a 200 response instead of a 500 error

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 4 Jonathan Druart 2022-04-05 12:20:36 UTC
Created attachment 132960 [details] [review]
Bug 30426: Add missing C4::Auth and C4::Output imports

This patch adds missing function imports for C4::Auth and C4::Output
in the opac/svc/suggestion script.

Test plan:

1. Go to http://localhost:8081/cgi-bin/koha/admin/didyoumean.pl
2. Turn on some plugins
3. Go to http://localhost:8080/cgi-bin/koha/opac-search.pl?idx=&q=test&weight_search=1
4. Note in your browser's Network tab that the call to
   http://localhost:8080/cgi-bin/koha/svc/suggestion?render=stub&q=test
   generates a 200 response instead of a 500 error

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 5 Fridolin Somers 2022-04-13 13:58:10 UTC
Pushed to master for 22.05, thanks to everybody involved ﷐[U+1F984]﷑
Comment 6 Kyle M Hall (khall) 2022-04-15 11:36:02 UTC
Pushed to 21.11.x for 21.11.05
Comment 7 Andrew Fuerste-Henry 2022-04-25 20:36:04 UTC
Missing dependency, not backported to 21.05