Dependency Graph

Dependency Graph
related to related to child of child of duplicate of duplicate of

View Issue Details

IDProjectCategoryView StatusLast Update
16937Bug reportsSurvey takingpublic2021-01-24 22:36
Reportergabrieljenik Assigned To 
Status newResolutionopen 
Product Version4.4.0-RC1 
Summary16937: Easy way to launch CDBException

Really easy to launch a CDbException publicly

Steps To Reproduce

Import included survey
Copy the start link with newtest=Y
Send the link

Additional Information

Seems prefilled value are not filtered with

Here it's with mysql, but other have same issue (date for example)

The 2 htmlk are done with debug or without

Original solution for LS3 on 16481 needs to be ported or enhanced for LS4.

TagsNo tags attached.
Complete LimeSurvey version number (& build)4.4.0-RC1
I will donate to the project if issue is resolvedNo
Sync to Zoho ProjectYes
Browsernot relevant
Database & DB-Versionmariadb
Server OS (if known)fedora/linux
Webserver software & version (if known)nginx
PHP Versionphp7.3


related to 16481 closedDenisChenu Easy way to launch CDBException 




2021-01-05 14:25

developer   ~61432




2021-01-11 17:11

developer   ~61481

Last edited: 2021-01-13 16:48

@DenisChenu commented on the PR:

for master : we need a better solution : move after setMoveResult ?

We have moved it:

  • from StartSurvey(), which is run inside initFirstStep()
  • to after setMoveResult

This is the list of steps it does for starting up:

     * Init session/params values depending of user moves
     * - It init the needed variables for navigation: initFirstStep, initTotalAndMaxSteps, setMoveResult
     * - Then perform all the needed checks before moving:
     *   + did the participant used browser navigation?
     *   + did he pressed clear cancel, is he a confirmed quota?
     *   + Is the previous step set?
     *   + Is the survey finished?
     *   + Are all the answer validated? (like: participant didn't answered to a mandatory question)
    private function initMove()
        $this->initFirstStep(); // If it's the first time user load this survey, will init session and LEM
        $this->checkIfUseBrowserNav(); // Check if user used browser navigation, or relaoded page
        if ($this->sMove != 'clearcancel' && $this->sMove != 'confirmquota') {
            $this->checkPrevStep(); // Check if prev step is set, else set it

Why do we need to move it after setMoveResult()?
Shouldn't it be done before so the EM data is available for setting the move?



2021-01-11 17:18

developer   ~61482

Last edited: 2021-01-13 16:48

To fix

prefilling value muts be done only when create survey by another way :)



2021-01-11 17:19

developer   ~61483

Last edited: 2021-01-13 16:48

PS :
Another solution : set it to defaultValue on EM ?



2021-01-12 21:55

developer   ~61507

Last edited: 2021-01-13 16:48

View 2 revisions

I understand now.
So now this ticket and 16482 (but for lsv4) are fixed.

This approach is OK for me!



2021-01-13 08:04

developer   ~61513

Last edited: 2021-01-13 16:48

Finally : i think you're right …

Use default value system are (maybe) not the best solution …

  • Prefill : value was set at start of survey even if variables are in last group
  • Default : value was set when step happen (for exemple : in last group : set just before submit).

I'm totally unsure on the best solution here … Using defaultvalue seems cool but unsure it the best solution.



2021-01-14 17:36

developer   ~61545

Ok, as to start fresh and avoid missunderstandings, I feel comfortable with the latest PR.
What do you think?



2021-01-14 17:42

developer   ~61546

if ($this->sSurveyMode != 'survey' && $_SESSION[$this->LEMsessid]['step'] == 0) return;

Yep : seems OK !

Maybe check $this->aSurveyInfo['showwelcome'] ?



2021-01-24 22:36

developer   ~61657

New PR:

Issue History

Date Modified Username Field Change
2020-12-31 15:24 gabrieljenik New Issue
2020-12-31 15:24 gabrieljenik Issue generated from: 16481
2020-12-31 15:25 gabrieljenik Additional Information Updated View Revisions
2020-12-31 15:25 gabrieljenik Relationship added related to 16481
2021-01-05 14:25 gabrieljenik Note Added: 61432
2021-01-11 17:11 gabrieljenik Note Added: 61481
2021-01-11 17:18 DenisChenu Note Added: 61482
2021-01-11 17:19 DenisChenu Note Added: 61483
2021-01-12 21:55 gabrieljenik Note Added: 61507
2021-01-12 21:56 gabrieljenik Note Edited: 61507 View Revisions
2021-01-13 08:04 DenisChenu Note Added: 61513
2021-01-13 16:48 cdorin Sync to Zoho Project => Yes
2021-01-14 17:36 gabrieljenik Note Added: 61545
2021-01-14 17:42 DenisChenu Note Added: 61546
2021-01-24 22:36 gabrieljenik Note Added: 61657