Summary: | Allow multiple plugin directories to be defined in koha-conf.xml | ||
---|---|---|---|
Product: | Koha | Reporter: | Kyle M Hall (khall) <kyle> |
Component: | Architecture, internals, and plumbing | Assignee: | Kyle M Hall (khall) <kyle> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | jonathan.druart, julian.maurice, tomascohen, ztajoli |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
It's now possible to define multiple plugin directories
in the Koha conf file. This allows for ease of plugin development so that each plugin installed can live in its own git repository. For compatibility, the first plugindir instance defined is used for uploading plugins via the web interface.
|
Version(s) released in: | |
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 20275 | ||
Attachments: |
Bug 15879 - Allow multiple plugin directories to be defined in koha-conf.xml
Bug 15879 - Allow multiple plugin directories to be defined in koha-conf.xml Bug 15879: Allow multiple plugin directories to be defined in koha-conf.xml Bug 15879: Allow multiple plugin directories to be defined in koha-conf.xml Bug 15879: Add Tests |
Description
Kyle M Hall (khall)
2016-02-22 14:25:15 UTC
Created attachment 48296 [details] [review] Bug 15879 - Allow multiple plugin directories to be defined in koha-conf.xml It would be very useful to be able to define multiple plugin directories in the Koha conf file. This would allow for ease of plugin development so that each plugin installed can live in its own git repository. For compatibility, the first plugindir instance defined should be the one used for uploading plugins via the web interface. Test Plan: 1) Apply this patch 2) Define a second pluginsdir line in your koha-conf.xml 3) Clone the kitchen sink plugin to this new path like this: git clone https://github.com/bywatersolutions/koha-plugin-kitchen-sink.git /path/to/new/plugins/dir 4) Restart memcached if you are running it 5) The Kitchen Sink plugin should now appear in your list of plugins! Created attachment 48297 [details] [review] Bug 15879 - Allow multiple plugin directories to be defined in koha-conf.xml It would be very useful to be able to define multiple plugin directories in the Koha conf file. This would allow for ease of plugin development so that each plugin installed can live in its own git repository. For compatibility, the first plugindir instance defined should be the one used for uploading plugins via the web interface. Test Plan: 1) Apply this patch 2) Define a second pluginsdir line in your koha-conf.xml 3) Clone the kitchen sink plugin to this new path like this: git clone https://github.com/bywatersolutions/koha-plugin-kitchen-sink.git /path/to/new/plugins/dir 4) Restart memcached if you are running it 5) The Kitchen Sink plugin should now appear in your list of plugins! (In reply to Kyle M Hall from comment #0) > It would be very useful to be able to define multiple plugin directories in > the Koha conf file. This would allow for ease of plugin development so that > each plugin installed can live in its own git repository. I think there is a better way to achieve this. Maybe each directory inside the plugin directory should be considered as a plugin. As an example, in Drupal 7 each directory with an .info file in it is considered as a module. (In reply to Julian Maurice from comment #3) > (In reply to Kyle M Hall from comment #0) > > It would be very useful to be able to define multiple plugin directories in > > the Koha conf file. This would allow for ease of plugin development so that > > each plugin installed can live in its own git repository. > > I think there is a better way to achieve this. Maybe each directory inside > the plugin directory should be considered as a plugin. > As an example, in Drupal 7 each directory with an .info file in it is > considered as a module. That is a good thought, but would require far more re-engineering of the plugin system ( and possibly all plugins ) to support such a system. Created attachment 58594 [details] [review] Bug 15879: Allow multiple plugin directories to be defined in koha-conf.xml It would be very useful to be able to define multiple plugin directories in the Koha conf file. This would allow for ease of plugin development so that each plugin installed can live in its own git repository. For compatibility, the first plugindir instance defined should be the one used for uploading plugins via the web interface. Test Plan: 1) Apply this patch 2) Define a second pluginsdir line in your koha-conf.xml 3) Clone the kitchen sink plugin to this new path like this: git clone https://github.com/bywatersolutions/koha-plugin-kitchen-sink.git /path/to/new/plugins/dir 4) Restart memcached if you are running it 5) The Kitchen Sink plugin should now appear in your list of plugins! Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> I rebased it against master and tested it on a kohadevbox Created attachment 58805 [details] [review] Bug 15879: Allow multiple plugin directories to be defined in koha-conf.xml It would be very useful to be able to define multiple plugin directories in the Koha conf file. This would allow for ease of plugin development so that each plugin installed can live in its own git repository. For compatibility, the first plugindir instance defined should be the one used for uploading plugins via the web interface. Test Plan: 1) Apply this patch 2) Define a second pluginsdir line in your koha-conf.xml 3) Clone the kitchen sink plugin to this new path like this: git clone https://github.com/bywatersolutions/koha-plugin-kitchen-sink.git /path/to/new/plugins/dir 4) Restart memcached if you are running it 5) The Kitchen Sink plugin should now appear in your list of plugins! Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> I rebased it against master and tested it on a kohadevbox Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Created attachment 58806 [details] [review] Bug 15879: Add Tests Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Hum, it seems that the kpz in t/db_dependent is wrong, it contains a ctags file which is not removed on delete. Kyle, do you want me to open a bug report for that problem? Something else, if I uninstall the KitchenSink plugin, it is still listed in the plugin list until I restart Plack. Is it a known bug? (In reply to Jonathan Druart from comment #8) > Hum, it seems that the kpz in t/db_dependent is wrong, it contains a ctags > file which is not removed on delete. > > Kyle, do you want me to open a bug report for that problem? Yes please! (In reply to Jonathan Druart from comment #9) > Something else, if I uninstall the KitchenSink plugin, it is still listed in > the plugin list until I restart Plack. Is it a known bug? Hmm, that is interesting. Definitely not a bug known to myself at least. Plack must be doing some kind of in memory caching perhaps? None of the code indicates the list of plugins is cached. Pushed to master for 17.05! This won't get ported back to 16.11.x as it is an enhancement. |