View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 14615 | Bug reports | Plugins | public | 2019-03-07 18:01 | 2026-11-20 10:23 |
| Reporter | Assigned To | c_schmitz | |||
| Priority | none | Severity | feature | ||
| Status | closed | Resolution | won't fix | ||
| Summary | 14615: new PluginEvent onBeginRequest | ||||
| Description | it is possible to create this event by myself in application/config/config.php 'onBeginRequest' => function($event) { I would like to have this event available by default in limesurvey to let plugins come into action as early as possible | ||||
| Tags | No tags attached. | ||||
| Bug heat | 8 | ||||
| Complete LimeSurvey version number (& build) | |||||
| I will donate to the project if issue is resolved | |||||
| Browser | |||||
| Database type & version | |||||
| Server OS (if known) | |||||
| Webserver software & version (if known) | |||||
| PHP Version | |||||
| Git branch / Pull Request URL | |||||
|
PluginEvent afterPluginLoad, which is imho earlier than onBeginRequest, doesnt work for me |
|
|
Denis, what's your opinion on this? |
|
|
beforeControllerAction is done after onBeginRequest ? But : if afterPluginLoad is not happen : plugin is not loaded ? Maybe review it to be more sooner ? PS : great tips about config to add event :) |
|
|
OK in 3.X if @bismark make the pull request ? |
|
|
in my plugin I do something like this: public function init()
the idea is to use https://www.yiiframework.com/doc/guide/1.1/en/basics.module |
|
|
Did Yii:app()->setModules can work in init ? Did you test ? Else : still a good event to have something related to request :) |
|
|
just tested setModules in init() of the Plugin <- doesnt work, 404 Could not resolve request |
|
|
This sounds like something that should be handled by a component system instead (adding modules dynamically to Yii). |
|
|
But if the event is accepted, it should probably add the $request variable to the event. |
|
|
@ollehar : in beforeControllerAction i add run like the Yii event : https://www.yiiframework.com/doc/api/1.1/CWebApplication#beforeControllerAction-detail But https://www.yiiframework.com/doc/api/1.1/CApplication#onBeginRequest-detail don't have any param/system? There are no request var at this time (except $_POST,$_GET …) [edit] |
|
|
@c_schmitz, can we add those 3 lines of code for the plugin request required for LS 3? It is no new feature, just a plugin event and we had added half a dozen plugin events to the stable LS3 version in the past since it will do no harm. For LS 4 we can use a different approach once we can properly include modules but for the current LS 3 version we need that event. |
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2019-03-07 18:01 |
|
New Issue | |
| 2019-03-08 01:29 |
|
Note Added: 50824 | |
| 2019-03-08 10:08 | Mazi | Assigned To | => DenisChenu |
| 2019-03-08 10:08 | Mazi | Status | new => assigned |
| 2019-03-08 10:09 | Mazi | Note Added: 50825 | |
| 2019-03-08 10:18 | DenisChenu | Note Added: 50826 | |
| 2019-03-08 10:19 | DenisChenu | Assigned To | DenisChenu => c_schmitz |
| 2019-03-08 10:19 | DenisChenu | Status | assigned => feedback |
| 2019-03-08 10:19 | DenisChenu | Note Added: 50827 | |
| 2019-03-08 10:40 |
|
Note Added: 50828 | |
| 2019-03-08 10:40 |
|
Status | feedback => assigned |
| 2019-03-08 11:36 | DenisChenu | Note Added: 50834 | |
| 2019-03-08 12:03 |
|
Note Added: 50842 | |
| 2019-03-08 15:03 |
|
Note Added: 50853 | |
| 2019-04-02 14:48 | ollehar | Note Added: 51274 | |
| 2019-04-02 14:49 | ollehar | Note Added: 51275 | |
| 2019-04-02 19:29 | DenisChenu | Note Added: 51288 | |
| 2019-04-02 19:31 | DenisChenu | Note Edited: 51288 | |
| 2019-04-03 09:40 | Mazi | Note Added: 51292 | |
| 2026-11-20 10:23 | c_schmitz | Status | assigned => closed |
| 2026-11-20 10:23 | c_schmitz | Resolution | open => won't fix |