View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
14987Bug reportsExpression Managerpublic2019-10-19 10:08
Reportercdorin Assigned ToDenisChenu  
PrioritynoneSeveritypartial_block 
Status closedResolutionfixed 
Product Version3.17.x 
Fixed in Version3.17.x 
Summary14987: Preview question not working
Description

Preview question not working if based on relevance equation.

Steps To Reproduce

Try to preview G02Q02 -> nothing is displayed.

TagsNo tags attached.
Attached Files
Bug heat4
Complete LimeSurvey version number (& build)github
I will donate to the project if issue is resolvedNo
Browser
Database type & versionirrelevant
Server OS (if known)
Webserver software & version (if known)
PHP Versionirrelevant

Relationships

related to 14936 closedDenisChenu Preview group : relevance on question broken 
related to 14988 closedDenisChenu Preview question group not working + relevance equations 

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2019-06-17 18:36

developer   ~52433

Previouly (in 2.6lts maybe after)

Preview group set relevance =1 to Group (force) : see code : https://github.com/LimeSurvey/LimeSurvey/blob/e2a9ca1adfa9d5693409566b0b60f07e9f3a114a/application/helpers/expressions/em_manager_helper.php#L3740-L3741

               if($this->sPreviewMode=='question') $fielddata['relevance']=1;
                if($this->sPreviewMode=='group') $fielddata['grelevance']=1;

But no update of question relevance :)
With /sid/347371/gid/859?showQuestion=Y : you can force show the 2nd question
Same with array_filter using GET for prefill values.

dominikvitt

dominikvitt

2019-06-18 13:33

developer   ~52440

@DenisChenu:
This issue first occurred after your commit:
https://github.com/LimeSurvey/LimeSurvey/commit/fa2fae1efa728f569cbcb98dae52fea5a8778c77

Do you have any workaround for this?

DenisChenu

DenisChenu

2019-06-18 14:57

developer   ~52443

@dominikvitt : it's false

I just git checkout 392b869292012b19b3606e711924cc2fc00b01c6 , fix DB for owner_uid
And see screenshot

The issue with this it's not happen everytime … see comment on https://bugs.limesurvey.org/view.php?id=14936

If relevance is OK (some times it was)

DenisChenu

DenisChenu

2019-06-18 15:01

developer   ~52444

The main issue is there are no ExpressionManager javascript inside survey

I think EM is not initialized : https://github.com/LimeSurvey/LimeSurvey/blob/e2a9ca1adfa9d5693409566b0b60f07e9f3a114a/application/helpers/expressions/em_manager_helper.php#L7257

It's the reason why it seems to happen after reset the session.

If you have already a EM session : it was not resetted (and can be old …) .

To check before https://github.com/LimeSurvey/LimeSurvey/commit/fa2fae1efa728f569cbcb98dae52fea5a8778c77 : you must NOT test survey or check survey logic file etc … before testing …

dominikvitt

dominikvitt

2019-06-18 15:37

developer   ~52445

I'm only testing with attached lss file.
When I tried to preview G02Q02 question after hard reset on https://github.com/LimeSurvey/LimeSurvey/commit/fa2fae1efa728f569cbcb98dae52fea5a8778c77 commit, it doesn't work.
When I tried to preview with hard reset one commit before , it works.

I can reproduce this behaviour at any time.

Please try to go one commit before.

DenisChenu

DenisChenu

2019-06-18 15:50

developer   ~52446

Yes, 392b869292012b19b3606e711924cc2fc00b01c6 is one commit before.

But try with :

  • Copy the preview link on text editor
  • Close your browser
  • Open browser
  • Log in
  • Paste the preview link
    => Since it's same than reset the surveyid session : you have the same issue :).
DenisChenu

DenisChenu

2019-06-19 11:49

developer   ~52452

Ready to go : https://github.com/LimeSurvey/LimeSurvey/pull/1298

DenisChenu

DenisChenu

2019-06-28 12:27

developer   ~52627

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

Related Changesets

LimeSurvey: master f8fb291c

2019-06-19 14:00:53

DenisChenu


Committer: GitHub Details Diff
Fixed issue 14936: Preview group : relevance on question broken (#1298)

Fixed issue 14987: Preview question not working
Dev: LimeExpressionManager:sPreviewMode
Dev: setVariableAndTokenMappingsForExpressionManager must have preview when it call
Dev: Don't need 1st step : preview must do whole
Dev: preview don't need checkForDataSecurityAccepted
Affected Issues
14936, 14987
mod - application/helpers/SurveyRuntimeHelper.php Diff File
mod - application/helpers/expressions/em_manager_helper.php Diff File

Issue History

Date Modified Username Field Change
2019-06-17 18:19 cdorin New Issue
2019-06-17 18:19 cdorin Status new => assigned
2019-06-17 18:19 cdorin Assigned To => dominikvitt
2019-06-17 18:19 cdorin File Added: limesurvey_survey_126764(2).lss
2019-06-17 18:19 cdorin Relationship added related to 14936
2019-06-17 18:22 cdorin Relationship added related to 14988
2019-06-17 18:36 DenisChenu Note Added: 52433
2019-06-18 13:33 dominikvitt Note Added: 52440
2019-06-18 14:57 DenisChenu File Added: Capture d’écran du 2019-06-18 14-56-49.png
2019-06-18 14:57 DenisChenu Note Added: 52443
2019-06-18 15:01 DenisChenu Note Added: 52444
2019-06-18 15:37 dominikvitt Note Added: 52445
2019-06-18 15:50 DenisChenu Note Added: 52446
2019-06-18 20:15 DenisChenu Assigned To dominikvitt => DenisChenu
2019-06-19 11:49 DenisChenu Note Added: 52452
2019-06-19 14:01 DenisChenu Status assigned => resolved
2019-06-19 14:01 DenisChenu Resolution open => fixed
2019-06-19 14:01 DenisChenu Fixed in Version => 3.17.x
2019-06-28 12:27 DenisChenu Changeset attached => LimeSurvey master f8fb291c
2019-06-28 12:27 DenisChenu Note Added: 52627
2019-10-19 10:08 DenisChenu Status resolved => closed