[Koha-bugs] [Bug 16455] TagsExternalDictionary does not work under Plack

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu May 5 18:00:24 CEST 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16455

--- Comment #1 from Jonathan Druart <jonathan.druart at 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.


More information about the Koha-bugs mailing list