[Koha-bugs] [Bug 31380] Build Mojolicious controller for running Koha plugins

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Aug 18 07:51:13 CEST 2022


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

David Cook <dcook at prosentient.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #139314|0                           |1
        is obsolete|                            |

--- Comment #9 from David Cook <dcook at prosentient.com.au> ---
Created attachment 139316
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139316&action=edit
Bug 31380: Allow Koha Plugins to run using Mojolicious controllers

This patch adds a new mount point in plack.psgi, which makes Koha
able to run Mojolicious controllers. For example:
http://localhost:8081/cgi-bin/koha/staff/plugins/run

0a) Apply patch
0b) cp debian/templates/plack.psgi /etc/koha/sites/kohadev/plack.psgi
0c) koha-plack --restart
1) Upload Koha Plugin koha-plugin-mojolicious.kpz
2) koha-plack --restart
3) Go to
http://localhost:8081/cgi-bin/koha/plugins/plugins-home.pl
4) Next to "Mojolicious Test", click "Actions", then click "Run tool"
5) Note that the web page looks perfect
6) Note that the URL is a bit different to normal:
http://localhost:8081/cgi-bin/koha/staff/plugins/run?class=Koha%3A%3APlugin%3A%3AProsentient%3A%3AMojolicious&method=tool
instead of:
http://localhost:8081/cgi-bin/koha/plugins/run.pl?class=Koha%3A%3APlugin%3A%3AProsentient%3A%3AMojolicious&method=tool

Note: The test Koha plugin will only work with a Mojolicious controller,
but it could be easily made to work with both

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list