Bug 9136 - C4::Tags not Plack-compatible
Summary: C4::Tags not Plack-compatible
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low major (vote)
Assignee: Jared Camins-Esakov
QA Contact: Jonathan Druart
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-23 19:18 UTC by Jared Camins-Esakov
Modified: 2013-05-23 06:24 UTC (History)
2 users (show)

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


Attachments
Bug 9136: C4::Tags not Plack-compatible (2.58 KB, patch)
2012-11-23 19:30 UTC, Jared Camins-Esakov
Details | Diff | Splinter Review
Bug 9136: C4::Tags not Plack-compatible (2.63 KB, patch)
2012-12-08 06:52 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 9136: C4::Tags not Plack-compatible (2.69 KB, patch)
2012-12-21 15:04 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 Jared Camins-Esakov 2012-11-23 19:18:42 UTC
Thanks to the various variable set in BEGIN and INIT blocks, C4::Tags is not Plack-compatible, which means that any attempt to use tags under Plack could be bad.
Comment 1 Jared Camins-Esakov 2012-11-23 19:30:27 UTC Comment hidden (obsolete)
Comment 2 Chris Cormack 2012-12-08 06:51:45 UTC
Tested that it still works under Apache .. works fine.
Comment 3 Chris Cormack 2012-12-08 06:52:57 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2012-12-21 15:04:23 UTC
QA Comments:
The patch works under Plack and Apache.

Marked as Passed QA.
Comment 5 Jonathan Druart 2012-12-21 15:04:41 UTC
Created attachment 14234 [details] [review]
Bug 9136: C4::Tags not Plack-compatible

The three module-scoped variables $ext_dict, @fields, and $select_all
were preventing tagging code from working under Plack. I fixed this
by changing the latter two to compile-time constants, and declared the
first with "our $ext_dict;"

To test (under Plack):
1) Try to create a tag before the patch is applied. Note that you get a
   500 error in the AJAX request.
2) Apply patch.
3) Repeat step (1), noticing that this time the tag is created and there
   is no error.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 6 Jared Camins-Esakov 2012-12-22 21:03:15 UTC
This patch has been pushed to master.
Comment 7 Chris Cormack 2012-12-26 19:41:25 UTC
Pushed to 3.10.x will be in 3.10.2