Plugin dirs defined in koha-conf.xml are added to @INC in order to compile perl code. Looks like with plack those dirs are added several times. This may lead to an error "INCLUDE_PATH exceeds 64 directories".
Created attachment 109946 [details] [review] Bug 26434: Fix plugin dirs addition to @INC Plugin dirs defined in koha-conf.xml are added to @INC in order to compile perl code. Looks like with plack those dirs are added several times. This may lead to an error "INCLUDE_PATH exceeds 64 directories". This bug was identified with Carrousel plugin : https://inlibro.com/instructions-carrousel/ Test plan : 1) Enable plack and plugins 2) Look at page about.pl : @INC contains one plugin dir 'var/lib/plugins' 3) Install plugin KitchenSink : https://github.com/bywatersolutions/koha-plugin-kitchen-sink 4) Dont apply patch 5) Use configure on KitchenSink 6) Look at page about.pl : @INC contains server plugin dir 'var/lib/plugins' 7) Apply patch and restart plack 8) Use configure on KitchenSink 9) Look at page about.pl : @INC contains one plugin dir 'var/lib/plugins'
Strangely we also see in @INC the template dirs : koha-tmpl/opac-tmpl and koha-tmpl/intranet-tmpl The duplicates like plugin dirs thats causes the error. With patch thoses dirs aren't duplicate anymore.
I want to say that I've seen these duplicates as well although I'd have to look again. I'm not sure about this solution though. I think this could use some more investigation.
(In reply to Fridolin SOMERS from comment #2) > Strangely we also see in @INC the template dirs : > koha-tmpl/opac-tmpl and koha-tmpl/intranet-tmpl > The duplicates like plugin dirs thats causes the error. > With patch thoses dirs aren't duplicate anymore. Considering the way TT finds plugins and include files, I'm not surprised it would push template directories onto @INC.
Created attachment 110056 [details] [review] Bug 26434: Fix plugin dirs addition to @INC Plugin dirs defined in koha-conf.xml are added to @INC in order to compile perl code. Looks like with plack those dirs are added several times. This may lead to an error "INCLUDE_PATH exceeds 64 directories". This bug was identified with Carrousel plugin : https://inlibro.com/instructions-carrousel/ Test plan : 1) Enable plack and plugins 2) Look at page about.pl : @INC contains one plugin dir 'var/lib/plugins' 3) Install plugin KitchenSink : https://github.com/bywatersolutions/koha-plugin-kitchen-sink 4) Dont apply patch 5) Use configure on KitchenSink 6) Look at page about.pl : @INC contains server plugin dir 'var/lib/plugins' 7) Apply patch and restart plack 8) Use configure on KitchenSink 9) Look at page about.pl : @INC contains one plugin dir 'var/lib/plugins' Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 110255 [details] [review] Bug 26434: Fix plugin dirs addition to @INC Plugin dirs defined in koha-conf.xml are added to @INC in order to compile perl code. Looks like with plack those dirs are added several times. This may lead to an error "INCLUDE_PATH exceeds 64 directories". This bug was identified with Carrousel plugin : https://inlibro.com/instructions-carrousel/ Test plan : 1) Enable plack and plugins 2) Look at page about.pl : @INC contains one plugin dir 'var/lib/plugins' 3) Install plugin KitchenSink : https://github.com/bywatersolutions/koha-plugin-kitchen-sink 4) Dont apply patch 5) Use configure on KitchenSink 6) Look at page about.pl : @INC contains server plugin dir 'var/lib/plugins' 7) Apply patch and restart plack 8) Use configure on KitchenSink 9) Look at page about.pl : @INC contains one plugin dir 'var/lib/plugins' Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Simple clean fix, no regresssions, no QA failures. Passing QA
Pushed to master for 20.11, thanks to everybody involved!
backported to 20.05.x for 20.05.05
backported to 19.11.x for 19.11.11
Backported to 19.05.x branch for 19.05.16
Created attachment 112577 [details] [review] Bug 26434: add Array::Utils module [19.05]
Backport to 19.05.x fixed, thanks James! :)