Bug 30426

Summary: suggestion service missing Auth and Output imports
Product: Koha Reporter: David Cook <dcook>
Component: OPACAssignee: David Cook <dcook>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: andrew, kyle
Version: Main   
Hardware: All   
OS: All   
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:
Bug Depends on: 17600    
Bug Blocks:    
Attachments: Bug 30426: Add missing C4::Auth and C4::Output imports
Bug 30426: Add missing C4::Auth and C4::Output imports
Bug 30426: Add missing C4::Auth and C4::Output imports

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