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.
Created attachment 13653 [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.
Tested that it still works under Apache .. works fine.
Created attachment 13957 [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>
QA Comments: The patch works under Plack and Apache. Marked as Passed QA.
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>
This patch has been pushed to master.
Pushed to 3.10.x will be in 3.10.2