When plugin_dir koha-conf.xml parameter contains more than one directory, PLUGIN_DIR parameter sent to templates doesn't contain the proper value, ie the base directory of the current plugin.
See bug 23237
Created attachment 112295 [details] [review] Bug 26803 - Fix PLUGIN_DIR when plugin_dirs is multivalued When plugin_dir koha-conf.xml parameter contains more than one directory, PLUGIN_DIR parameter sent to templates doesn't contain the proper value, ie the base directory of the current plugin. See bug 23237
Created attachment 112362 [details] [review] Bug 26803 - Fix PLUGIN_DIR when plugin_dirs is multivalued When plugin_dir koha-conf.xml parameter contains more than one directory, PLUGIN_DIR parameter sent to templates doesn't contain the proper value, ie the base directory of the current plugin. See bug 23237 Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
I propose the following test plan : 1) install a plugin which make use of PLUGIN_DIR in templates and check it works 2) adding a new plugin dir to koha-conf.xml and restart_all 3) plugin doesn't work anymore. 4) apply patch and restart_all 5) the plugin should now work As an example plugin which requires the variable I used this one : https://github.com/fredericd/Koha-Plugin-Tamil-Mirabel
Thanks Arthur for the test plan. The plugin concerned can be directly downloaded using this link: https://www.tamil.fr/download/koha-plugin-tamil-mirabel-1.0.2.kpz
I'm ok this works, but I think its much better to keep get_plugin_dir() method. There a chance it is used by some plugins. Just change its content to return bundle_path(). Also this is a bug report more than enhancement no ?
Created attachment 112518 [details] [review] Bug 26803 - Fix PLUGIN_DIR when plugin_dirs is multivalued When plugin_dir koha-conf.xml parameter contains more than one directory, PLUGIN_DIR parameter sent to templates doesn't contain the proper value, ie the base directory of the current plugin. See bug 23237 Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(In reply to Fridolin SOMERS from comment #6) > I'm ok this works, but I think its much better to keep get_plugin_dir() > method. > There a chance it is used by some plugins. > Just change its content to return bundle_path(). > > Also this is a bug report more than enhancement no ? Ah OK method plugin_dir() is quite new (19.11). So I'd say its OK to remove it.
Pushed to master for 20.11, thanks to everybody involved!
This is a bug report more than enhancement no ? Please backport.
(In reply to Fridolin SOMERS from comment #10) > This is a bug report more than enhancement no ? > Please backport. Please change Importance in this case. :)
(In reply to Katrin Fischer from comment #11) > (In reply to Fridolin SOMERS from comment #10) > > This is a bug report more than enhancement no ? > > Please backport. > > Please change Importance in this case. :) Ok cool I was waiting the assignee to agree ;)
Thks Fridolin. I agree with you. It could be backported down to 19.11