Summary: | Unapi does not function under Plack | ||
---|---|---|---|
Product: | Koha | Reporter: | Jared Camins-Esakov <jcamins> |
Component: | Architecture, internals, and plumbing | Assignee: | Jared Camins-Esakov <jcamins> |
Status: | CLOSED FIXED | QA Contact: | Jonathan Druart <jonathan.druart> |
Severity: | blocker | ||
Priority: | P5 - low | CC: | chris, jonathan.druart |
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: | ||
Circulation function: | |||
Attachments: |
Bug 10085: unapi does not function under Plack
Bug 10085: unapi does not function under Plack Bug 10085: unapi does not function under Plack |
Description
Jared Camins-Esakov
2013-04-20 02:43:15 UTC
Created attachment 17565 [details] [review] Bug 10085: unapi does not function under Plack The following errors appear when trying to use unapi under Plack (among others): Variable "$cgi" is not available at /home/jcamins/kohaclone/opac/unapi line 160. Variable "$format_to_stylesheet_map" is not available at /home/jcamins/kohaclone/opac/unapi line 173. Variable "$format_info" is not available at /home/jcamins/kohaclone/opac/unapi line 174. Variable "$format_to_stylesheet_map" is not available at /home/jcamins/kohaclone/opac/unapi line 185. To test: 1) Try to view /cgi-bin/koha/unapi under Plack 2) There is no step 2. Plack crashes. 3) Apply patch. 4) Try to view /cgi-bin/koha/unapi again, and note that it doesn't crash Comment on attachment 17565 [details] [review] Bug 10085: unapi does not function under Plack Review of attachment 17565 [details] [review]: ----------------------------------------------------------------- ::: opac/unapi @@ -158,3 @@ > > if (defined $id) { > print $cgi->header( -type =>'application/xml', -status => '300 multiple choices' ); WTF ... how did this ever work??? Created attachment 17566 [details] [review] Bug 10085: unapi does not function under Plack The following errors appear when trying to use unapi under Plack (among others): Variable "$cgi" is not available at /home/jcamins/kohaclone/opac/unapi line 160. Variable "$format_to_stylesheet_map" is not available at /home/jcamins/kohaclone/opac/unapi line 173. Variable "$format_info" is not available at /home/jcamins/kohaclone/opac/unapi line 174. Variable "$format_to_stylesheet_map" is not available at /home/jcamins/kohaclone/opac/unapi line 185. To test: 1) Try to view /cgi-bin/koha/unapi under Plack 2) There is no step 2. Plack crashes. 3) Apply patch. 4) Try to view /cgi-bin/koha/unapi again, and note that it doesn't crash Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> I'm puzzled how this ever worked anyway, accidentally i'm guessing, this tidies up some lazy coding QA comment: Remove some global variables. Work as expected with and without Plack. Marked as Passed QA. Created attachment 17578 [details] [review] Bug 10085: unapi does not function under Plack The following errors appear when trying to use unapi under Plack (among others): Variable "$cgi" is not available at /home/jcamins/kohaclone/opac/unapi line 160. Variable "$format_to_stylesheet_map" is not available at /home/jcamins/kohaclone/opac/unapi line 173. Variable "$format_info" is not available at /home/jcamins/kohaclone/opac/unapi line 174. Variable "$format_to_stylesheet_map" is not available at /home/jcamins/kohaclone/opac/unapi line 185. To test: 1) Try to view /cgi-bin/koha/unapi under Plack 2) There is no step 2. Plack crashes. 3) Apply patch. 4) Try to view /cgi-bin/koha/unapi again, and note that it doesn't crash Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> I'm puzzled how this ever worked anyway, accidentally i'm guessing, this tidies up some lazy coding Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> This patch has been pushed to master and 3.12.x. Pushed to 3.10.x will be in 3.10.6 |