View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
06078 | Bug reports | Survey taking | public | 2012-05-09 18:17 | 2012-05-28 15:11 |
Reporter | TMSWhite | Assigned To | TMSWhite | ||
Priority | high | Severity | crash | ||
Status | closed | Resolution | fixed | ||
Product Version | 2.00RC1 | ||||
Fixed in Version | 2.00RC1 | ||||
Summary | 06078: invalid LimeExpressionManager->ngT() calls | ||||
Description | They can't be used if min/max answers (etc.) are variables, otherwise get errors like this: PHP notice Use of undefined constant maxSelect - assumed 'maxSelect' C:\xampp\htdocs\git\limesurvey_yii\application\third_party\php-gettext\gettext.php(361) : eval()'d code(1) 356 $string = str_replace('plural',"\$plural",$string); #1 379 else #2 54 */ #3 1534 // min/max answers | ||||
Steps To Reproduce | install sample survey from this link: http://docs.limesurvey.org/Expression+Manager+Sample+Surveys#Traditional_Validation_Re-envisioned Fill out page 1 and click Next and you will see this error | ||||
Tags | No tags attached. | ||||
Bug heat | 4 | ||||
Complete LimeSurvey version number (& build) | 120501 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | |||||
Database type & version | Mysql 5.3 | ||||
Server OS (if known) | Windows XP | ||||
Webserver software & version (if known) | XAMPP | ||||
PHP Version | 5.3 | ||||
Can full expressions be used in these attributes? Or just simple variables? |
|
full expressions can be used in most advanced question attributes |
|
So do you think could we do something like "if ({$min_answers}==1,'".sprintf($this->gT("Please select at least %s answer,$min_answers)."','".sprintf($this->gT("Please select at least %s answers,$min_answers)."')" in there? |
|
It's a little trickier than that. I'm working on it and should be done soon. |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=8392 |
|
Fix committed to Yii branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=8393 |
|
Version 2.00RC2 released. |
|
LimeSurvey: master 7f03e543 2012-05-10 10:17:46 Details Diff |
Fixed issue 06078: invalid LimeExpressionManager->ngT() calls Dev Since min/max number of answers and min/max values can be dynamic, used EM to act as dynamic version of ngT() Dev EM will detect cases where the messages are static, and generate static content for them (rather than the nested if() statements) Dev Fixed printablesurvey so that only uses static tips - showing the pretty-print version with the nested if() statements does not make sense on printable survey Dev added sample survey to test the dynamic plurals generation. |
Affected Issues 06078 |
|
add - docs/demosurveys/ls2_plurals_test.lss | Diff File | ||
mod - admin/printablesurvey.php | Diff File | ||
mod - classes/expressions/LimeExpressionManager.php | Diff File | ||
LimeSurvey: Yii 51589bd8 2012-05-10 10:18:38 Details Diff |
Fixed issue 06078: invalid LimeExpressionManager->ngT() calls Dev Since min/max number of answers and min/max values can be dynamic, used EM to act as dynamic version of ngT() Dev EM will detect cases where the messages are static, and generate static content for them (rather than the nested if() statements) Dev Fixed printablesurvey so that only uses static tips - showing the pretty-print version with the nested if() statements does not make sense on printable survey Dev added sample survey to test the dynamic plurals generation. |
Affected Issues 06078 |
|
add - docs/demosurveys/ls2_plurals_test.lss | Diff File | ||
mod - application/controllers/admin/printablesurvey.php | Diff File | ||
mod - application/helpers/expressions/em_manager_helper.php | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-05-09 18:17 | TMSWhite | New Issue | |
2012-05-10 14:07 | c_schmitz | Note Added: 18660 | |
2012-05-10 14:08 | c_schmitz | Assigned To | => c_schmitz |
2012-05-10 14:08 | c_schmitz | Status | new => feedback |
2012-05-10 14:17 | TMSWhite | Note Added: 18661 | |
2012-05-10 14:17 | TMSWhite | Status | feedback => assigned |
2012-05-10 14:28 | c_schmitz | Note Added: 18662 | |
2012-05-10 17:16 | TMSWhite | Note Added: 18664 | |
2012-05-10 19:19 | TMSWhite | Changeset attached | => LimeSurvey master 7f03e543 |
2012-05-10 19:19 | TMSWhite | Note Added: 18665 | |
2012-05-10 19:19 | TMSWhite | Assigned To | c_schmitz => TMSWhite |
2012-05-10 19:19 | TMSWhite | Resolution | open => fixed |
2012-05-10 19:20 | TMSWhite | Changeset attached | => LimeSurvey Yii 51589bd8 |
2012-05-10 19:20 | TMSWhite | Note Added: 18666 | |
2012-05-10 19:21 | TMSWhite | Status | assigned => resolved |
2012-05-10 19:21 | TMSWhite | Fixed in Version | => 2.00RC1 |
2012-05-28 15:11 | c_schmitz | Note Added: 18945 | |
2012-05-28 15:11 | c_schmitz | Status | resolved => closed |