View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
08718 | Bug reports | Survey editing | public | 2014-02-14 00:53 | 2014-02-16 18:32 |
Reporter | adamzammit | Assigned To | c_schmitz | ||
Priority | normal | Severity | partial_block | ||
Status | closed | Resolution | fixed | ||
Product Version | 2.05+ | ||||
Fixed in Version | 2.05+ | ||||
Summary | 08718: Adding subquestions to multilingual survey causes database inconsistency | ||||
Description | In a survey that is already multilingual, it appears that adding subquestions creates a unique qid (instead of a unique qid,language pair). For example, adding subquestions where 4 languages are selected creates the following in the database: qid,lang,parent_qid Instead of: qid,lang,parent_qid As expected. This then causes problems when deleting a subquestion as the code for deleting a subquestion deletes by qid, expecting them all languages to contain the same qid. The database then becomes inconsistent with stray subquestions for other languages besides the main one deleted. I think the code for adding subquestions where multiple languages exist needs to be updated to make sure the qid is the same. | ||||
Steps To Reproduce |
| ||||
Tags | No tags attached. | ||||
Attached Files | fix8718.patch (707 bytes)
--- /tmp/limesurvey/application/controllers/admin/database.php 2014-02-12 21:15:20.000000000 +1100 +++ application/controllers/admin/database.php 2014-02-14 14:08:51.000000000 +1100 @@ -288,6 +288,7 @@ if(!$oSubQuestion) $oSubQuestion=new Question; $oSubQuestion->sid=$iSurveyID; + $oSubQuestion->qid = $aInsertQID[$iScaleID][$iPosition]; $oSubQuestion->gid=$iQuestionGroupID; $oSubQuestion->question_order=$iPosition+1; $oSubQuestion->title=$aCodes[$iScaleID][$iPosition]; | ||||
Bug heat | 8 | ||||
Complete LimeSurvey version number (& build) | 140212 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | Firefox | ||||
Database type & version | MySQL 5.5.35 | ||||
Server OS (if known) | Ubuntu 12.04 | ||||
Webserver software & version (if known) | Apache 2 | ||||
PHP Version | 5.3.10 | ||||
Adam, are you sure that this issue still exists in the current build? This was already resolved a couple weeks ago. Maybe it is a remain of a previous version? |
|
Hi Carsten, I just double checked by clearing browser cache, and checked via a directory diff with the download of build 140212 so there isn't any remnants of a previous version. Problem persists. Can you point me to the fix and I'll check if it is applied? Adam |
|
Have a look at https://github.com/LimeSurvey/LimeSurvey/commit/390642a2e168754f776cf4720418230f5859a5ae |
|
Please check with a clean newly created survey. |
|
With a newly created survey the same issue occurs. I notice for the first subquestion added, the qid stays the same for all languages, but for the second and subsequent subquestions, the qid becomes sequential and unique for each. |
|
Hi Carsten, The fix you referred to appears to be for a separate issue. I have attached a patch which fixes the problem for me. I didn't commit it as I would prefer someone else confirms the issue for them before proceeding to patch the mainline. Adam |
|
Thank you very much - looks great! |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=13889 |
|
2.05+ Build 140216 released |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2014-02-14 00:53 | adamzammit | New Issue | |
2014-02-14 00:56 | c_schmitz | Note Added: 28728 | |
2014-02-14 00:56 | c_schmitz | Assigned To | => c_schmitz |
2014-02-14 00:56 | c_schmitz | Status | new => feedback |
2014-02-14 01:04 | adamzammit | Note Added: 28730 | |
2014-02-14 01:04 | adamzammit | Status | feedback => assigned |
2014-02-14 01:07 | c_schmitz | Note Added: 28731 | |
2014-02-14 01:08 | c_schmitz | Note Added: 28732 | |
2014-02-14 01:18 | c_schmitz | Status | assigned => feedback |
2014-02-14 01:21 | adamzammit | Note Added: 28733 | |
2014-02-14 01:21 | adamzammit | Status | feedback => assigned |
2014-02-14 04:15 | adamzammit | File Added: fix8718.patch | |
2014-02-14 04:17 | adamzammit | Note Added: 28734 | |
2014-02-14 04:17 | adamzammit | Status | assigned => feedback |
2014-02-14 05:16 | adamzammit | Issue Monitored: adamzammit | |
2014-02-14 12:46 | mfaber | Issue Monitored: mfaber | |
2014-02-14 13:20 | c_schmitz | Note Added: 28738 | |
2014-02-14 13:20 | c_schmitz | Status | feedback => resolved |
2014-02-14 13:20 | c_schmitz | Fixed in Version | => 2.05+ |
2014-02-14 13:20 | c_schmitz | Resolution | open => fixed |
2014-02-14 13:21 | c_schmitz | Changeset attached | => LimeSurvey master 691e3cd8 |
2014-02-14 13:21 | c_schmitz | Note Added: 28739 | |
2014-02-16 18:32 | c_schmitz | Note Added: 28773 | |
2014-02-16 18:32 | c_schmitz | Status | resolved => closed |
2019-11-01 17:25 | c_schmitz | Category | Survey design => Survey editing |
2021-08-02 20:20 | guest | Bug heat | 4 => 8 |