Bug 41991 - Suspend a plugin method or specific plugin class (per process or vhost)
Summary: Suspend a plugin method or specific plugin class (per process or vhost)
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Plugin architecture (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Marcel de Rooy
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-03-05 09:05 UTC by Marcel de Rooy
Modified: 2026-03-05 15:03 UTC (History)
6 users (show)

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


Attachments
Bug 41991: Introduce SUSPEND_PLUGIN in Koha::Plugins->call (1.31 KB, patch)
2026-03-05 15:03 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 41991: Unit tests (2.64 KB, patch)
2026-03-05 15:03 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 41991: Unit tests (2.59 KB, patch)
2026-03-05 15:03 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel de Rooy 2026-03-05 09:05:21 UTC
This starts from a use case where I do want to suspend a certain item plugin hook for a specific command line process. But I dont want to disable the plugin for all processes.

So yes, this requires enough understanding from the admin who does that.

My idea is to introduce something similar here to the override_syspref construct. To allow suspending a plugin method or class via an environment variable.
Comment 1 Marcel de Rooy 2026-03-05 14:59:55 UTC
Any feedback appreciated.
Comment 2 Marcel de Rooy 2026-03-05 15:03:22 UTC
Created attachment 194514 [details] [review]
Bug 41991: Introduce SUSPEND_PLUGIN in Koha::Plugins->call

Test plan:
Add a SetEnv for your staff client in Apache to suspend a plugin class.
Verify that that specific plugin class was not run.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 3 Marcel de Rooy 2026-03-05 15:03:24 UTC Comment hidden (obsolete)
Comment 4 Marcel de Rooy 2026-03-05 15:03:53 UTC
Created attachment 194516 [details] [review]
Bug 41991: Unit tests

Test plan:
Run t/db_dependent/Koha/Plugins/Plugins.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>