View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|16673||Bug reports||Plugins||public||2020-09-18 11:09||2020-09-22 16:04|
|Summary||16673: afterFindSurvey is fired multiple times|
The afterFindSurvey event is fired every type a Question is rendered (it seems).
I stumbled upon this, because I used a sendmail option in a plugin on the event.
|Steps To Reproduce|
You should expect it to fire once, I guess
|Tags||No tags attached.|
|Complete LimeSurvey version number (& build)||4.3.16|
|I will donate to the project if issue is resolved||No|
|Sync to Zoho Project|
|Database & DB-Version||N.A.|
|Server OS (if known)||Centos 7|
|Webserver software & version (if known)||apache|
Not only after question render! The survey I tested fired 3748 times! (767 questions)
Maybe we can move it to the satci part of find ?
twigreneder seems to happen a lot too.
It wil reduce processor cycles! It is massive! Who knows: renderspeed improvement?
With Sample survey https://github.com/LimeSurvey/LimeSurvey/blob/master/docs/demosurveys/ls3_sample_survey_multilingual_fr_de_en_it.lss
There are clearly a new issue here.
But more :! my 3.X version for testing have already a lot of plugins …
limesurvey_survey_SampleAllInOne.lss (432,939 bytes)
Seems we don't use findByPk in 3.X on some function.
We must use findByPk … for Survey (and anywhere it's possible)
this issue should also be addressed to 3xLTS
No : 3LTS : event happen 2 times only, no real issue in LTS. Can be improved, but still no a real issue.
Did you test my plugin ?
Strange. I don't see why it is called so few times on LSv3 if the event happens afterFind.
As per the definition of the manual, I would just trigger the event manually from the survey taking side, instead of attaching it to the
Am I right? Or am I missing something?
findByPk don't throw afterFind event.
Plugin can need to update attribute each time it was loaded. Even o admin part : it don't happen a lot, 3 times for Survey settings. Currently plugin event happen in admin , stay in admin please …
Dev can control where it's call with
|2020-09-18 11:09||asshank||New Issue|
|2020-09-18 11:52||asshank||Note Added: 59873|
|2020-09-19 18:49||DenisChenu||Note Added: 59885|
|2020-09-19 21:07||asshank||Note Added: 59887|
|2020-09-21 15:39||DenisChenu||Note Added: 59905|
|2020-09-21 15:41||DenisChenu||Note Added: 59907|
|2020-09-21 15:41||DenisChenu||File Added: limesurvey_survey_SampleAllInOne.lss|
|2020-09-21 15:41||DenisChenu||Assigned To||=> cdorin|
|2020-09-21 15:41||DenisChenu||Status||new => assigned|
|2020-09-21 15:42||DenisChenu||Severity||minor => tweak|
|2020-09-21 15:46||DenisChenu||Note Added: 59910|
|2020-09-21 21:19||bismark||Note Added: 59912|
|2020-09-22 08:51||DenisChenu||Note Added: 59917|
|2020-09-22 15:34||gabrieljenik||Note Added: 59925|
|2020-09-22 16:04||DenisChenu||Note Added: 59926|
|2020-09-22 16:04||DenisChenu||File Added: Capture d’écran du 2020-09-22 16-02-13.png|