View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
14495Bug reports_ Unknownpublic2019-07-15 11:49
Reporterrealitix Assigned ToDenisChenu  
PrioritynoneSeverityminor 
Status closedResolutionfixed 
Product Version3.15.x 
Fixed in Version3.15.x 
Summary14495: Fix for duplicate fieldname not working
Description

Hello,

I found a bug on today master branch.
You can see the steps to reproduce it.

Steps To Reproduce
  1. Create a new survey with one group
  2. Create one question of type "Multiple choice with comment" (P)
  3. Set the subquestions like this:

SQ001 ; SQ001 légitime
SQ001comment ; SQ001 injection
comment ; injectionseule

  1. Enable the survey -> Warning. Indeed that's not a bug
  2. Click on "Click here to fix" -> It's looping without fixing

So you can't fix it with the button "Click here to fix"

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

Relationships

related to 14272 closedcdorin Multiple text with comment and subquestion «comment» validation and logic file is broken 

Users monitoring this issue

There are no users monitoring this issue.

Activities

realitix

realitix

2019-02-06 16:52

reporter   ~50427

Here the pull request: https://github.com/LimeSurvey/LimeSurvey/pull/1213

DenisChenu

DenisChenu

2019-02-06 23:21

developer   ~50428

Last edited: 2019-02-06 23:25

1: must fix it in model : see https://github.com/LimeSurvey/LimeSurvey/blob/0c0cf2bb2fab25146c38858fc0b897787e031188/application/models/Question.php#L132
2: must fix only https://github.com/LimeSurvey/LimeSurvey/blob/51f685f31172bee68802a0885600568377d89845/application/helpers/admin/activate_helper.php#L22

Not in database.php

for model since ending with comment seems to broke Expression manager (check survey logic file) disable ending code with comment directly

realitix

realitix

2019-02-07 11:48

reporter   ~50434

I have to understand the rule logic.
Is there a guide to explain how it works ?

DenisChenu

DenisChenu

2019-02-07 12:02

developer   ~50435

Last edited: 2019-02-07 12:03

https://www.yiiframework.com/wiki/56/reference-model-rules-validation

But LimeSurvey Question model have some really complex rules.

Something like this

            if ($oParentQuestion->type == "P") {
                $aRules[] = /* todo */
            }

Maybe some match rules ?
https://www.yiiframework.com/wiki/56/reference-model-rules-validation#match-cregularexpressionvalidator
https://www.yiiframework.com/doc/api/1.1/CRegularExpressionValidator

realitix

realitix

2019-02-07 14:40

reporter   ~50442

I updated the pull request with your indication.

DenisChenu

DenisChenu

2019-02-09 17:05

developer   ~50481

https://github.com/LimeSurvey/LimeSurvey/commit/a47c09d18bf47b1205b5586d451ee6d2002cef4b

realitix

realitix

2019-02-19 10:54

reporter   ~50622

I added a new pull request to enforce the filter, to avoid 'comment'

https://github.com/LimeSurvey/LimeSurvey/pull/1228

Issue History

Date Modified Username Field Change
2019-02-06 15:38 realitix New Issue
2019-02-06 16:52 realitix Note Added: 50427
2019-02-06 23:19 DenisChenu Assigned To => DenisChenu
2019-02-06 23:19 DenisChenu Status new => assigned
2019-02-06 23:21 DenisChenu Note Added: 50428
2019-02-06 23:22 DenisChenu Note Edited: 50428
2019-02-06 23:25 DenisChenu Note Edited: 50428
2019-02-07 11:48 realitix Note Added: 50434
2019-02-07 12:02 DenisChenu Note Added: 50435
2019-02-07 12:03 DenisChenu Note Edited: 50435
2019-02-07 14:40 realitix Note Added: 50442
2019-02-09 17:05 DenisChenu Status assigned => resolved
2019-02-09 17:05 DenisChenu Resolution open => fixed
2019-02-09 17:05 DenisChenu Fixed in Version => 3.15.x
2019-02-09 17:05 DenisChenu Note Added: 50481
2019-02-19 10:54 realitix Note Added: 50622
2019-04-30 09:11 c_schmitz Status resolved => closed
2019-07-15 11:49 DenisChenu Relationship added related to 14272