Relationship Graph

Relationship Graph
related to related to child of child of duplicate of duplicate of

View Issue Details

IDProjectCategoryView StatusLast Update
16667Bug reportsPluginspublic2020-09-15 11:01
ReporterDenisChenu Assigned ToDenisChenu  
PrioritynoneSeverityminor 
Status closedResolutionfixed 
Target Version4.1.17Fixed in Version4.3.15 
Summary16667: Unable to update format (A,G,Q) or index (full, etc ) by plugin
Description

See https://bugs.limesurvey.org/view.php?id=16460#c59784

Steps To Reproduce

See https://bugs.limesurvey.org/view.php?id=16460#c59784

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

Relationships

related to 16460 closedDenisChenu Unable to update format (A,G,Q) or index (full, etc ) by plugin 

Activities

DenisChenu

DenisChenu

2020-09-14 12:59

developer   ~59786

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=30458

DenisChenu

DenisChenu

2020-09-14 13:00

developer   ~59787

https://github.com/LimeSurvey/LimeSurvey/commit/942d0f20d0a006c229e92416e676dbb77fe67d66

asshank

asshank

2020-09-14 13:13

reporter   ~59788

Hi Denis.. Thanx...
But I miss the setting of aOptions in the 3.x branche now, but maybe this is not a problem in 3.x
$this->setOptions($this->gsid);

https://github.com/LimeSurvey/LimeSurvey/blob/3.x-LTS/application/models/Survey.php

DenisChenu

DenisChenu

2020-09-14 18:30

developer   ~59791

I never try …

$this->getEvent()->set('gsid',1);

The way to set with event

asshank

asshank

2020-09-14 18:57

reporter   ~59793

in 4.x the survey-object contains the array 'aOptions' and 'oOptions
in 3.x the survey-object contains only 'oOptions'

I think it has something to do with Twig (twig likes array instead of object?)

We use 4.x so both are there (luxury)

DenisChenu

DenisChenu

2020-09-14 19:40

developer   ~59794

It's NOT to update options, is to update property
https://github.com/LimeSurvey/LimeSurvey/blob/942d0f20d0a006c229e92416e676dbb77fe67d66/application/models/Survey.php#L26

DenisChenu

DenisChenu

2020-09-14 19:40

developer   ~59795

in 4.x the survey-object contains the array 'aOptions' and 'oOptions

Where what line ? Really don't think in afterFind …

asshank

asshank

2020-09-14 19:51

reporter   ~59796

https://github.com/LimeSurvey/LimeSurvey/commit/942d0f20d0a006c229e92416e676dbb77fe67d66 this is the 4.x fix/feature today
In this one is a
$this->setOptions($this->gsid);

https://github.com/LimeSurvey/LimeSurvey/commit/408683da06de984ecf3fa360b0779bd75e36fab9 This is the 3.x fix/feature couple of month ago
there is not suche a line

And I noticed when left out,, aOptions is not set! But this happens in 4.x (confusing!)

So the question is: why $this->setOptions($this->gsid); in 4.x and not in 3.x?

DenisChenu

DenisChenu

2020-09-14 20:25

developer   ~59797

$this->setAttribute in both .

Never seen setOptions

asshank

asshank

2020-09-14 20:50

reporter   ~59798

hard to explain:
I have made 2 screenshots
Both from github... the difference is better to see!

lime4x = https://github.com/LimeSurvey/LimeSurvey/blob/942d0f20d0a006c229e92416e676dbb77fe67d66/application/models/Survey.php
lime3x = https://github.com/Shnoulle/LimeSurvey-Shnoulle/blob/d3cf0a81fab469f11ed660f1c1fd898fd42fa623/application/models/Survey.php

Mabey there is nothing wrong.. but there is a difference!

lime3x.png (50,026 bytes)   
lime3x.png (50,026 bytes)   
lime4x.png (58,428 bytes)   
lime4x.png (58,428 bytes)   
DenisChenu

DenisChenu

2020-09-15 08:12

developer   ~59803

LimeSurvey 4 have inherited value, not 3 :)

I never use setOptions …
https://github.com/LimeSurvey/LimeSurvey/commit/07c3a949afe8aacbd65869cb438f086c28f9e54b

See with @dominikvitt

asshank

asshank

2020-09-15 09:17

reporter   ~59805

the event-object contains 'surveyid'

I also found this in beforeRegister event (although that is a realy old one and the manual states surveyid correctly)

All other event-objects contain: 'surveyId'

So maybe change surveyid to surveyId ?

Both in 3.x and 4.x

DenisChenu

DenisChenu

2020-09-15 09:35

developer   ~59806

I think i already reported this issue :)

There are one event receiving survey for surveyId …

lime_release_bot

lime_release_bot

2020-09-15 11:01

administrator   ~59807

Fixed in Release 4.3.16+200915

Related Changesets

LimeSurvey: master 942d0f20

2020-07-06 15:51:45

DenisChenu

Details Diff
Fixed issue 16667: Unable to update format or questionindex by plugin
Dev : all attributes allowed
Dev: cherry-pick
Affected Issues
16667
mod - application/models/Survey.php Diff File

Issue History

Date Modified Username Field Change
2020-09-14 12:56 DenisChenu New Issue
2020-09-14 12:56 DenisChenu Status new => assigned
2020-09-14 12:56 DenisChenu Assigned To => DenisChenu
2020-09-14 12:56 DenisChenu Relationship added related to 16460
2020-09-14 12:59 DenisChenu Changeset attached => LimeSurvey master 942d0f20
2020-09-14 12:59 DenisChenu Note Added: 59786
2020-09-14 12:59 DenisChenu Resolution open => fixed
2020-09-14 13:00 DenisChenu Status assigned => resolved
2020-09-14 13:00 DenisChenu Fixed in Version => 4.3.15
2020-09-14 13:00 DenisChenu Note Added: 59787
2020-09-14 13:13 asshank Note Added: 59788
2020-09-14 18:30 DenisChenu Note Added: 59791
2020-09-14 18:57 asshank Note Added: 59793
2020-09-14 19:40 DenisChenu Note Added: 59794
2020-09-14 19:40 DenisChenu Note Added: 59795
2020-09-14 19:51 asshank Note Added: 59796
2020-09-14 20:25 DenisChenu Note Added: 59797
2020-09-14 20:50 asshank Note Added: 59798
2020-09-14 20:50 asshank File Added: lime3x.png
2020-09-14 20:50 asshank File Added: lime4x.png
2020-09-15 08:12 DenisChenu Note Added: 59803
2020-09-15 09:17 asshank Note Added: 59805
2020-09-15 09:35 DenisChenu Note Added: 59806
2020-09-15 11:01 lime_release_bot Note Added: 59807
2020-09-15 11:01 lime_release_bot Status resolved => closed