Bug 27116

Summary: Send CGI to Koha plugins adding JS/CSS
Product: Koha Reporter: Fridolin Somers <fridolin.somers>
Component: Plugin architectureAssignee: Fridolin Somers <fridolin.somers>
Status: CLOSED INVALID QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: dcook
Version: Main   
Hardware: All   
OS: All   
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:

Description Fridolin Somers 2020-11-30 14:14:14 UTC
Koha plugins using hooks opac_head/js or intranet_head/js should be created with CGI context.
So that the behaviour may depend on vars sent to page.
Comment 1 David Cook 2020-12-01 01:33:12 UTC
While I can see the short-term gain, this sounds like a long-term headache. 

Wherever possible, we should be trying to avoid all things CGI these days. Not doing so is just adding technical debt...
Comment 2 Fridolin Somers 2020-12-01 07:42:11 UTC
(In reply to David Cook from comment #1)
> While I can see the short-term gain, this sounds like a long-term headache. 
> 
> Wherever possible, we should be trying to avoid all things CGI these days.
> Not doing so is just adding technical debt...

Ahhh I see your point, specially for OPAC we encourage REST API.
Since plugins can create API routes, lets say its the way to provide datas.

I close.