Bug 39964 - PLUGIN_PATH/get_plugin_http_path() doesn't work for most installs
Summary: PLUGIN_PATH/get_plugin_http_path() doesn't work for most installs
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Plugin architecture (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-22 00:44 UTC by David Cook
Modified: 2025-11-11 22:03 UTC (History)
1 user (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Cook 2025-05-22 00:44:20 UTC
I was trying to use PLUGIN_PATH/get_plugin_http_path() in KTD but it was producing an invalid URL path.

But that's because that variable/function dates from bug 7804 (written in 2010 and then added to Koha in 2013). Back then, I remember it was sometimes necessary to manually add 'Alias /plugin/ "/var/lib/koha/plugins/"' to your Apache configuration.

It appears that Alias was added to "etc/koha-httpd.conf" in bug 7804 but not added to the Debian Apache files. 

These days, plugins are served from other places than "/var/lib/koha/plugins" anyway. 

But yeah... just noting this for now...
Comment 1 David Liddle 2025-11-11 08:40:26 UTC
Hi, can you tell me if this bug – and/or the alias issue – is likely the reason why plugin images aren't loading in the instance I manage? (Currently 22.11, will be upgraded to 24.11, but dates back to 2012.) I was doing some auditing and pruning in this area today, and I noticed that the path to the images is incorrect, but it wasn't clear to me where a fix should be implemented. Will an alias entry fix that? If so, in which .conf file(s) would this be best placed? Thanks!
Comment 2 David Cook 2025-11-11 22:03:45 UTC
(In reply to David Liddle from comment #1)
> Hi, can you tell me if this bug – and/or the alias issue – is likely the
> reason why plugin images aren't loading in the instance I manage? (Currently
> 22.11, will be upgraded to 24.11, but dates back to 2012.) I was doing some
> auditing and pruning in this area today, and I noticed that the path to the
> images is incorrect, but it wasn't clear to me where a fix should be
> implemented. Will an alias entry fix that? If so, in which .conf file(s)
> would this be best placed? Thanks!

Depends on your plugin. If it's a publicly accessible site, DM me on Mattermost and I could take a quick peek.