View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
10934 | Bug reports | Expression Manager | public | 2016-04-13 12:23 | 2016-04-15 10:24 |
Reporter | Mazi | Assigned To | DenisChenu | ||
Priority | none | Severity | crash | ||
Status | closed | Resolution | fixed | ||
Product Version | 2.06+ | ||||
Target Version | 2.06+ | Fixed in Version | 2.06+ | ||
Summary | 10934: EM regexMatch function don't show pattern error and different behaviour in JS and PHP | ||||
Description | For a multiple short text question I was using the EM question validation feature to make sure the ZIP code entered at a certain sub-question uses 5 digits only. Even when adjusting the regex to check that a field is not empty (/.\S./), the same error shows up. | ||||
Steps To Reproduce |
| ||||
Additional Information | I just tested using the latest 2.06LTS version which includes a fix for https://bugs.limesurvey.org/view.php?id=10860 but that didn't help. The same issue shpws up using LS 2.50. | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Bug heat | 6 | ||||
Complete LimeSurvey version number (& build) | LS206LTS 2016-04-13 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | Chrome | ||||
Database type & version | MySQL 5 | ||||
Server OS (if known) | Ubuntu | ||||
Webserver software & version (if known) | Apache 2 | ||||
PHP Version | 5.5.9 | ||||
Denis, I am assigning this to you since you had just fixed a similar issue (10860). |
|
I couldn't update the "I will donate to the project if issue is resolved" setting but I will donate once this was fixed. |
|
Donate to me ? |
|
Not same issue, then remove the link. It's surely a bug between JS regexp and PHP regexp |
|
regexMatch('/^[0-9]{5}$/',Validation2_03) work |
|
I can either donate to the project or to you or both, whatever you prefer. Thanks for providing the additional regex. I really wonder why that makes a difference...?! |
|
Unknown modifier ']' http://www.sondages.pro/brouillon/ You're regexp have an issue an / must be preceded by \ But this must be shown in Validate EM |
|
OK : in PHP : try reg_match($pattern.'u', $input); then "/.../.../" return false Then remove first / and last / 2 fix to do :
|
|
PS: Uploaded fixed lss file. |
|
1st part : show the error : https://github.com/LimeSurvey/LimeSurvey/pull/475 |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=18522 |
|
Fix committed to 2.06lts branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=18523 |
|
Wont fix the JS/PHP difference actually. |
|
Version 2.50+ Build 160415 released |
|
LimeSurvey: master 4b5ef24d 2016-04-13 16:19 Details Diff |
Fixed issue 10934: EM regexMatch function don't show pattern error Dev: add a geterrors_$funcName possibility to all function |
Affected Issues 10934 |
|
mod - application/helpers/expressions/em_core_helper.php | Diff File | ||
LimeSurvey: master 3c60ab01 2016-04-14 09:26 Details Diff |
Merge pull request #475 from Shnoulle/master_fix10934_errorreturn Fixed issue 10934: EM regexMatch function don't show pattern error |
Affected Issues 10934 |
|
mod - application/helpers/expressions/em_core_helper.php | Diff File | ||
LimeSurvey: 2.06lts e559a200 2016-04-14 10:24 Details Diff |
Fixed issue 10934: EM regexMatch function don't show pattern error Dev: add a geterrors_$funcName possibility to all function Dev: lts support by external unpaid dev |
Affected Issues 10934 |
|
mod - application/helpers/expressions/em_core_helper.php | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2016-04-13 12:23 | Mazi | New Issue | |
2016-04-13 12:23 | Mazi | Status | new => assigned |
2016-04-13 12:23 | Mazi | Assigned To | => DenisChenu |
2016-04-13 12:23 | Mazi | File Added: limesurvey_survey_377849.lss | |
2016-04-13 12:24 | Mazi | Relationship added | related to 10860 |
2016-04-13 12:24 | Mazi | Note Added: 37302 | |
2016-04-13 12:25 | Mazi | Additional Information Updated | |
2016-04-13 12:25 | Mazi | Reproducibility | have not tried => always |
2016-04-13 12:26 | Mazi | Note Added: 37303 | |
2016-04-13 12:33 | DenisChenu | Note Added: 37307 | |
2016-04-13 12:34 | DenisChenu | Relationship deleted | related to 10860 |
2016-04-13 12:35 | DenisChenu | Note Added: 37308 | |
2016-04-13 12:37 | DenisChenu | Note Added: 37309 | |
2016-04-13 12:40 | Mazi | Note Added: 37311 | |
2016-04-13 12:49 | DenisChenu | Note Added: 37313 | |
2016-04-13 12:53 | DenisChenu | File Added: limesurvey_survey_regexp_fix.lss | |
2016-04-13 12:54 | DenisChenu | Summary | EM regexMatch function prevents user to go to next screen though validation is true => EM regexMatch function have different behaviour in JS and PHP |
2016-04-13 12:57 | DenisChenu | Note Added: 37316 | |
2016-04-13 13:56 | DenisChenu | Note Added: 37325 | |
2016-04-13 16:26 | DenisChenu | Note Added: 37344 | |
2016-04-14 09:27 | DenisChenu | Changeset attached | => LimeSurvey master 4b5ef24d |
2016-04-14 09:27 | DenisChenu | Changeset attached | => LimeSurvey master 3c60ab01 |
2016-04-14 09:27 | DenisChenu | Note Added: 37361 | |
2016-04-14 09:27 | DenisChenu | Resolution | open => fixed |
2016-04-14 09:34 | DenisChenu | Summary | EM regexMatch function have different behaviour in JS and PHP => EM regexMatch function don't show pattern error and different behaviour in JS and PHP |
2016-04-14 10:24 | DenisChenu | Changeset attached | => LimeSurvey 2.06lts e559a200 |
2016-04-14 10:24 | DenisChenu | Note Added: 37369 | |
2016-04-14 11:57 | DenisChenu | Note Added: 37374 | |
2016-04-14 11:57 | DenisChenu | Status | assigned => resolved |
2016-04-14 11:57 | DenisChenu | Fixed in Version | => 2.06+ |
2016-04-15 10:24 | c_schmitz | Note Added: 37412 | |
2016-04-15 10:24 | c_schmitz | Status | resolved => closed |