View Issue Details

This bug affects 1 person(s).
 2
IDProjectCategoryView StatusLast Update
18475Bug reportsPluginspublic2022-11-09 11:28
ReporterDenisChenu Assigned To 
PrioritynoneSeverityminor 
Status newResolutionopen 
Product Version5.4.x 
Summary18475: Multiple event newQuestionAttributes happen
Description

I you have a plugin with newQuestionAttributes : it happen for each quetsion loaded (and $this->event->get('questionAttributes')

Steps To Reproduce

Steps to reproduce

Import addScriptToQuestion plugin (dev version) https://gitlab.com/SondagesPro/QuestionSettingsType/addScriptToQuestion/-/tree/dev_LSissue
Activate
Set debug to 1
Preview survey
See result
Compare with 3.X

Expected result

Event happen one time (since it's needed only one time)

Actual result

Happen a lot of time

TagsNo tags attached.
Bug heat2
Complete LimeSurvey version number (& build)5.4.9
I will donate to the project if issue is resolvedNo
Browsernot relevant
Database type & versionnot relevant
Server OS (if known)not relevant
Webserver software & version (if known)not relevant
PHP Versionnot relevant

Users monitoring this issue

User List There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2022-11-09 10:28

developer  

3X_1times.png (135,021 bytes)
5X_122times.png (33,010 bytes)   
5X_122times.png (33,010 bytes)   
DenisChenu

DenisChenu

2022-11-09 10:30

developer   ~72651

In 3.X : core + plugin was set in a static array
In 5. core + plugin are not in static array

Unsure about QuetsinTheme :
maybe

  • core in static
  • newQuestionAttributes event : plugin in static
  • QuestionTheme update static array

And a new feature with newQuestionThemeAttributes but think we don't really need it

DenisChenu

DenisChenu

2022-11-09 11:28

developer   ~72652

Unsure related : Get : Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 20480 bytes) in E:\WebSite\limesurvey\application\models\services\QuestionAttributeHelper.php on line 35 Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 81920 bytes) in E:\WebSite\limesurvey\third_party\yiisoft\yii\framework\logging\CLogger.php on line 15

I deactivate all plugins and try to import again

Issue History

Date Modified Username Field Change
2022-11-09 10:28 DenisChenu New Issue
2022-11-09 10:28 DenisChenu File Added: 3X_1times.png
2022-11-09 10:28 DenisChenu File Added: 5X_122times.png
2022-11-09 10:30 DenisChenu Note Added: 72651
2022-11-09 10:30 DenisChenu Bug heat 0 => 2
2022-11-09 11:28 DenisChenu Note Added: 72652