Bug 9136

Summary: C4::Tags not Plack-compatible
Product: Koha Reporter: Jared Camins-Esakov <jcamins>
Component: Architecture, internals, and plumbingAssignee: Jared Camins-Esakov <jcamins>
Status: CLOSED FIXED QA Contact: Jonathan Druart <jonathan.druart>
Severity: major    
Priority: P5 - low CC: chris, jonathan.druart
Version: Main   
Hardware: All   
OS: All   
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
Bug 9136: C4::Tags not Plack-compatible
Bug 9136: C4::Tags not Plack-compatible

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