View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
05541 | Bug reports | Survey taking | public | 2011-10-29 11:56 | 2012-03-14 21:12 |
Reporter | jcleeland | Assigned To | TMSWhite | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 2.00a2 | ||||
Target Version | 2.00a2 | Fixed in Version | 1.92RC2 | ||
Summary | 05541: Certain LimeReplacementFields no longer working in 2.00 | ||||
Description | {QID} and {SGQ} are no longer working in version 2 | ||||
Steps To Reproduce | Create a survey. Create a group. Create a single question. Insert, in the question text, the values {QID} and {SGQ}. These should be replaced, when the survey is run, with the value for the question id, and the SGQA value. However, instead they are reported as undefined variables according to the EM category. Sample survey attached. | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Bug heat | 4 | ||||
Complete LimeSurvey version number (& build) | 2 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | |||||
Database type & version | mysql | ||||
Server OS (if known) | windows | ||||
Webserver software & version (if known) | apache2 | ||||
PHP Version | 5something | ||||
Jason- {QID} and {SGQA} are working inconsistently. If you use {QID} and {SGQA} in the Help section of your question, you will see the proper values. So, EM isn't been informed of the QID and SGQA values prior to expansion of the Title and Question text. I'll dig deeper. |
|
Jason- The root cause is that replacements_helper needs to have $question set in order to populate QID and SGQA (see line 100 of replacements_helper.php). This comes through via the new $redata array (which has been a pain to debug). Running a normal survey, I only see $question populated and passed through to template_replace from these points: However, ExpressionManager thinks it is done after the second call, and the QID replacements were done before the first call. This explains why Help Text has the proper QID value (since it is called late) and the others don't. We really need to refactor the whole process of composing a page and doing replacements. I'll see what I can do short term first. Any help you could provide would also be appreciated. |
|
This was fixed prior to the release of _CI branch 2.0a, at least 1.5 months ago, but I don't recall the exact version number. |
|
1.92RC2 released. |
|
Fix committed to Yii branch. |
|
LimeSurvey: Yii 08eef706 2011-11-03 08:08:21 Details Diff |
Fixed 05541: Certain LimeReplacementFields no longer working in 2.00 Dev Core problem was that Dtexts was calling EM before variables were properly set. Refactored so as to completely remove Dtexts. Dev Works for Group-by-Group mode Dev Needs to be tested for other survey modes, and for surveyls_url and email generation. If this change breaks those, then can create a different function to do EM replacements for those. git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_ci@11316 b72ed6b6-b9f8-46b5-92b4-906544132732 |
Affected Issues 05541 |
|
rm - application/libraries/Dtexts.php | Diff File | ||
mod - application/controllers/survey.php | Diff File | ||
mod - application/helpers/expressions/em_core_helper.php | Diff File | ||
mod - application/helpers/expressions/em_manager_helper.php | Diff File | ||
mod - application/helpers/frontend_helper.php | Diff File | ||
mod - application/helpers/qanda_helper.php | Diff File | ||
mod - application/helpers/replacements_helper.php | Diff File | ||
mod - application/libraries/Group_format.php | Diff File | ||
mod - application/libraries/Question_format.php | Diff File | ||
mod - application/libraries/Survey_format.php | Diff File | ||
LimeSurvey: Yii 3445cdc5 2011-11-03 10:08:07 Details Diff |
Fixed 05541: Certain LimeReplacementFields no longer working in 2.00 Dev Works for All-in-one mode git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_ci@11318 b72ed6b6-b9f8-46b5-92b4-906544132732 |
Affected Issues 05541 |
|
mod - application/libraries/Survey_format.php | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2011-10-29 11:56 | jcleeland | New Issue | |
2011-10-29 11:56 | jcleeland | Status | new => assigned |
2011-10-29 11:56 | jcleeland | Assigned To | => TMSWhite |
2011-10-29 11:58 | jcleeland | File Added: qid not working.lss | |
2011-10-31 21:13 | TMSWhite | Note Added: 16577 | |
2011-11-01 15:51 | TMSWhite | Note Added: 16580 | |
2011-12-30 01:11 | TMSWhite | Note Added: 16765 | |
2011-12-30 01:11 | TMSWhite | Status | assigned => resolved |
2011-12-30 01:11 | TMSWhite | Fixed in Version | => 2.00a1 |
2011-12-30 01:11 | TMSWhite | Resolution | open => fixed |
2012-01-20 13:07 | c_schmitz | Fixed in Version | 2.00a1 => 1.92RC2 |
2012-01-20 13:08 | c_schmitz | Note Added: 16839 | |
2012-01-20 13:08 | c_schmitz | Status | resolved => closed |
2012-03-14 21:08 | TMSWhite | Changeset attached | => Import 2012-03-09 13:30:34 Yii 3445cdc5 |
2012-03-14 21:08 | TMSWhite | Changeset attached | => Import 2012-03-09 13:30:34 Yii 08eef706 |
2012-03-14 21:08 | TMSWhite | Note Added: 17923 | |
2012-03-14 21:08 | TMSWhite | Status | closed => resolved |
2012-03-14 21:12 | c_schmitz | Status | resolved => closed |