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.
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.
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
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>
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>
Pushed to master for 22.05, thanks to everybody involved [U+1F984]
Pushed to 21.11.x for 21.11.05
Missing dependency, not backported to 21.05