[Bug 16455] New: TagsExternalDictionary does not work under Plack
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16455 Bug ID: 16455 Summary: TagsExternalDictionary does not work under Plack Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: jonathan.druart@bugs.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org Depends on: 16444 The pref TagsExternalDictionary is used to tell Lingua::Ispell to use an other dictionary, different from the default one (/usr/bin/ispell). To do so we need to set $Lingua::Ispell::path to the expected path. It's currently done in the INIT block. If you try to use C4::Tags, you will get the famous "Too late to run INIT block at C4/Tags.pm line 74." warning. Plack use the INIT block to load functions at run time, when we are using C4::Tags when hitting a pl script, the compilation phase is finished and it's "too late to run INIT block" from C4::Tags. I do not really know if it has an impact on the behavior of Lingua::Ispell (i.e. is the path redefined?), but I know that this INIT block is not executed when we want. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16444 [Bug 16444] C4::Tags is not plack safe -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16455 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16455 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 51247 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51247&action=edit Bug 16455: Remove the "Too late to run INIT block" from C4::Tags The pref TagsExternalDictionary is used to tell Lingua::Ispell to use an other dictionary, different from the default one (/usr/bin/ispell). To do so we need to set $Lingua::Ispell::path to the expected path. It's currently done in the INIT block. If you try to use C4::Tags, you will get the famous "Too late to run INIT block at C4/Tags.pm line 74." warning. Plack use the INIT block to load functions at run time, when we are using C4::Tags when hitting a pl script, the compilation phase is finished and it's "too late to run INIT block" from C4::Tags. I do not really know if it has an impact on the behavior of Lingua::Ispell (i.e. is the path redefined?), but I know that this INIT block is not executed when we want. Test plan: under Plack, - hit /cgi-bin/koha/opac-search.pl and confirm that the warning does no longer appears - Use another dictionnary (??), fill TagsExternalDictionary with its path and confirm that it is used by the tags approval system -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16455 Jacek Ablewicz <abl@biblos.pk.edu.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |abl@biblos.pk.edu.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16455 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtompset@hotmail.com --- Comment #2 from M. Tompsett <mtompset@hotmail.com> --- Oops... duplicated effort, but for different reasons. See bug 16637. I think adding the PerlDependencies.pm for Lingua::Ispell might be an idea. Otherwise you may get an explosion when you fill it in with the default value /usr/bin/ispell, because Lingua::Ispell isn't guaranteed to be installed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16455 --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to M. Tompsett from comment #2)
Oops... duplicated effort, but for different reasons. See bug 16637. I think adding the PerlDependencies.pm for Lingua::Ispell might be an idea. Otherwise you may get an explosion when you fill it in with the default value /usr/bin/ispell, because Lingua::Ispell isn't guaranteed to be installed.
I'd prefer to keep this one (especially because I have already submitted other patches using the "does not work under plack" pattern in commit msg). And maybe create another one for the missing deps. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16455 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16455 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #51247|0 |1 is obsolete| | --- Comment #4 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 51970 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51970&action=edit Bug 16455: Remove the "Too late to run INIT block" from C4::Tags The pref TagsExternalDictionary is used to tell Lingua::Ispell to use an other dictionary, different from the default one (/usr/bin/ispell). To do so we need to set $Lingua::Ispell::path to the expected path. It's currently done in the INIT block. If you try to use C4::Tags, you will get the famous "Too late to run INIT block at C4/Tags.pm line 74." warning. Plack use the INIT block to load functions at run time, when we are using C4::Tags when hitting a pl script, the compilation phase is finished and it's "too late to run INIT block" from C4::Tags. I do not really know if it has an impact on the behavior of Lingua::Ispell (i.e. is the path redefined?), but I know that this INIT block is not executed when we want. Test plan: under Plack, - hit /cgi-bin/koha/opac-search.pl and confirm that the warning does no longer appears - Use another dictionnary (??), fill TagsExternalDictionary with its path and confirm that it is used by the tags approval system Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16455 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | Patch complexity|--- |Small patch CC| |m.de.rooy@rijksmuseum.nl --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- QA: Claiming this one too now -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16455 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16455 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #51970|0 |1 is obsolete| | --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 52051 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52051&action=edit Bug 16455: Remove the "Too late to run INIT block" from C4::Tags The pref TagsExternalDictionary is used to tell Lingua::Ispell to use an other dictionary, different from the default one (/usr/bin/ispell). To do so we need to set $Lingua::Ispell::path to the expected path. It's currently done in the INIT block. If you try to use C4::Tags, you will get the famous "Too late to run INIT block at C4/Tags.pm line 74." warning. Plack use the INIT block to load functions at run time, when we are using C4::Tags when hitting a pl script, the compilation phase is finished and it's "too late to run INIT block" from C4::Tags. I do not really know if it has an impact on the behavior of Lingua::Ispell (i.e. is the path redefined?), but I know that this INIT block is not executed when we want. Test plan: under Plack, - hit /cgi-bin/koha/opac-search.pl and confirm that the warning does no longer appears - Use another dictionnary (??), fill TagsExternalDictionary with its path and confirm that it is used by the tags approval system Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16455 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=16637 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16455 --- Comment #7 from M. Tompsett <mtompset@hotmail.com> --- Comment on attachment 52051 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52051 Bug 16455: Remove the "Too late to run INIT block" from C4::Tags Review of attachment 52051: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=16455&attachment=52051) ----------------------------------------------------------------- ::: C4/Tags.pm @@ +57,4 @@
} if ($ext_dict) { require Lingua::Ispell; + import Lingua::Ispell qw(spellcheck add_word_lc);
Why is save_dictionary missing? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16455 --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to M. Tompsett from comment #7)
Comment on attachment 52051 [details] [review] Bug 16455: Remove the "Too late to run INIT block" from C4::Tags
Review of attachment 52051 [details] [review]: -----------------------------------------------------------------
::: C4/Tags.pm @@ +57,4 @@
} if ($ext_dict) { require Lingua::Ispell; + import Lingua::Ispell qw(spellcheck add_word_lc);
Why is save_dictionary missing?
Is not used. At least I looked for it.. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16455 --- Comment #9 from M. Tompsett <mtompset@hotmail.com> --- (In reply to Marcel de Rooy from comment #8)
(In reply to M. Tompsett from comment #7)
Why is save_dictionary missing? Is not used. At least I looked for it..
Okay. I went hunting further, and agree it isn't used. Just made applying the patch difficult. So I worked on 16637 without this, since there is no overlap in files. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16455 Brendan Gallagher <brendan@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |brendan@bywatersolutions.co | |m --- Comment #10 from Brendan Gallagher <brendan@bywatersolutions.com> --- Pushed to Master - Should be in the November 2016 Release. Thanks -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16455 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |16637 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16637 [Bug 16637] Dependency for C4::Tags not listed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16455 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also|https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=16637 | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16455 --- Comment #11 from Marc Véron <veron@veron.ch> --- Created attachment 52193 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52193&action=edit Bug 16697: Translatability: Fix problem with isolated "'s"in request.tt This patch fixes translation problems with tag-isolated 's in koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt The patch fixes it at two places. In consequence, some other texts ares sigthly changed to make them look similar. To test: - Inspect code changes and verify that the new wording makes sense. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16455 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |veron@veron.ch Attachment #52193|0 |1 is obsolete| | --- Comment #12 from Marc Véron <veron@veron.ch> --- Comment on attachment 52193 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52193 Bug 16697: Translatability: Fix problem with isolated "'s"in request.tt Sorry for the wrong attachment, I was distracted and mistaked. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16455 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr --- Comment #13 from Frédéric Demians <frederic@tamil.fr> --- Pushed in 16.05. Will be in 16.05.01. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16455 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com Status|Pushed to Master |Pushed to Stable --- Comment #14 from Julian Maurice <julian.maurice@biblibre.com> --- Patch pushed to 3.22.x, will be in 3.22.8 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org