View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
16548 | Bug reports | Plugins | public | 2020-07-30 13:32 | 2021-04-28 20:16 |
Reporter | LimeBot | Assigned To | gabrieljenik | ||
Priority | none | Severity | minor | ||
Status | closed | Resolution | no change required | ||
Product Version | 4.3.6 | ||||
Summary | 16548: Only one Plugin menu item can be displayed when the menubar is rendered - Faulty "beforeAdminMenuRender" Events | ||||
Description | I installed two plugins that have suscribed to the "beforeAdminMenuRender" and have some menu items. But only one Menu Item is displayed. Each activated plugins with a "beforeAdminMenuRender" event with a menu item should be rendered in the top menu bar. | ||||
Steps To Reproduce |
| ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Bug heat | 6 | ||||
Complete LimeSurvey version number (& build) | 4.3.6 + 200727 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | |||||
Database type & version | Mysql/postgres .... | ||||
Server OS (if known) | |||||
Webserver software & version (if known) | |||||
PHP Version | 5.6 / 7.4 | ||||
As per the current design of the plugin system, this is not an bug but a plugin design problem. The problem arises when a plugin sets 'extraMenus' using $oEvent->set('extraMenus', [$oNewMenu]) instead of appending: $oEvent->append('extraMenus', [$oNewMenu]). It can be a problem that a plugin can override other plugin's menus, but it seems to be designed like that. So, suggested feature would be to have the plugin dispatcher to append the outputs of different plugins instead of allowing them to be oberriden. Thanks! |
|
Yes, know issue : more a documentation issue
Must allow SET whole menu too … extraMenus is an array, you can (posibiliy) add multiple menu and maybe remove men,u My opinion : documentation issue, not code issue. See https://manual.limesurvey.org/NewQuestionAttributes#The_event to have append as example. |
|
There a starting point for prioritize in 4.X : https://github.com/LimeSurvey/LimeSurvey/commit/a313ca0f5d05aa640b70c89197f168ac7f1836ab#diff-e3eaef28f5cb03f927f51c2097f40186 Not enough (need plugin dependance like Linux services) |
|
@ollehar @c_shmitz Is there something to do here? Should we make menus to always be appended instead having the possibility overriding them? |
|
It's issue in plugin ? If a plugin override : it's a plugin issue, not a core issue. If for this evant we don't have append : it's a core issue. For example : any plugin can disable ALL question attribute (and some can want to disable some attribute). |
|
Need plugin code to know :) |
|
Plugin author need to use append() instead of set() on the event data. Should work then. |
|
No change required ;) |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2020-07-30 13:32 | LimeBot | New Issue | |
2020-07-30 13:32 | LimeBot | Status | new => assigned |
2020-07-30 13:32 | LimeBot | Assigned To | => cdorin |
2020-07-30 13:32 | LimeBot | File Added: Plugin 0.PNG | |
2020-07-30 13:32 | LimeBot | File Added: Plugin 1.PNG | |
2020-08-20 15:24 | cdorin | Assigned To | cdorin => gabrieljenik |
2020-08-24 17:11 | gabrieljenik | Note Added: 59595 | |
2020-08-27 17:35 | DenisChenu | Note Added: 59644 | |
2020-08-27 17:36 | DenisChenu | Note Added: 59645 | |
2020-08-27 17:39 | DenisChenu | Note Added: 59646 | |
2021-04-28 18:12 | gabrieljenik | Note Added: 64174 | |
2021-04-28 18:19 | DenisChenu | Note Added: 64175 | |
2021-04-28 18:19 | DenisChenu | Note Added: 64176 | |
2021-04-28 18:21 | ollehar | Note Added: 64177 | |
2021-04-28 18:22 | ollehar | Note Edited: 64177 | |
2021-04-28 19:27 | gabrieljenik | Status | assigned => closed |
2021-04-28 19:27 | gabrieljenik | Resolution | open => fixed |
2021-04-28 20:16 | DenisChenu | Resolution | fixed => no change required |
2021-04-28 20:16 | DenisChenu | Description Updated | |
2021-04-28 20:16 | DenisChenu | Note Added: 64179 |