View Issue Details

This issue affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
05315Bug reportsConditionspublic2011-07-09 19:56
Reportergwwri Assigned Tolemeur  
PrioritynormalSeveritypartial_block 
Status closedResolutionfixed 
Product Version1.87+ 
Summary05315: Conditions randomly stopped workong on a single group....fixed by reimporting
Description

I had a survey that worked fine. I did some work on it, and now the (simple) conditions on the first page/group don't work. I "fixed" this by exporting the group and then reimporting it (without changing anything)back into the survey and putting the new group next to the old on. The conditions work fine on the new group but not on the old group.

The survey was active (being tested) and I deactivated it to move some questions around, and then the conditions stopped working ONLY on the first page (which was NOT the page I changed anything on). I exported just that group and imported it into a new survey and it worked fine. Then I imported it back into the SAME survey and so there are two identical pages: on one the conditions work, on the second they don't. So I FIXED the problem, by just deleting the old group, but I don't understand why this happened in the first place. Has anyone ever heard of this? When I exported and re-imported the whole original survey the problem still persists, I had to just export and re-import the group itself to fix it.

Steps To Reproduce

I don't know why the conditions stopped working.

Additional Information

Yes I know I'm only using 1.87.We're using MS SQL server on a windows machine and apparently there are big performance issues with that and we'd have to rewrite a lot of the custom code we wrote for this version to fix issues. If people's responses are just "well you should have upgraded" then I guess I'm out of luck.

I've attached a trimmed down version of the survey. It's only two pages. Both are copies of the same group. The first is the original. There is some VERY basic branching I put in as a test on the first question and lots more based on the "have you visited Israel" question. None of it works. The next page is the EXACT same group exported and imported. The branching does work on this one. The only differences are some label changes on the first page to make the branching that is supposed to be there more obvious and disabling of some mandatory questions (because otherwise you could never see the second page).

[Check that..it won't let me upload....I"ll do it as a comment]

What is causing the conditions to work on the second page but not the first?

TagsNo tags attached.
Attached Files
Bug heat4
Complete LimeSurvey version number (& build)8518
I will donate to the project if issue is resolvedNo
Browserfirefox
Database type & versionMS SQL server 2008
Server OS (if known)Windows Sever
Webserver software & version (if known)unknown
PHP Versionunknown
Git branch / Pull Request URL

Users monitoring this issue

There are no users monitoring this issue.

Activities

gwwri

gwwri

2011-07-07 19:23

reporter   ~15673

Update: after the fix I came up with (export and re-import the group) the survey worked fine, and I activated it for testing. We then found a question we wanted to change so I deactivated the survey and the same thing happened again.

Guess I need to export and re-import the group again. I wonder if this will suddenly happen during data collection? Fingers are crossed but I'm not optimistic.

gwwri

gwwri

2011-07-07 20:13

reporter   ~15674

FYI: If you look at the source of the first page vs the second in the "Java for conditions" section, the two pages look identical (except the question codes are different obviously) but the one that dosen't work has this chunk of code that the one that does work dosen't have. I don't know java so I don't know what it does, but it seems to be the reason it dosen't work. Why is lime putting this here?

if (document.getElementById('runonce').value == '0')
{

if ((()) || (()))
{

document.getElementById('question8452').style.display='';
document.getElementById('display8452').value='on';
}
else
{
document.getElementById('question8452').style.display='none';
document.getElementById('display8452').value='';
}
}
if (document.getElementById('runonce').value == '0')
{

if ((()) || (()))
{

document.getElementById('question8453').style.display='';
document.getElementById('display8453').value='on';
}
else
{
document.getElementById('question8453').style.display='none';
document.getElementById('display8453').value='';
}
}

lemeur

lemeur

2011-07-09 19:56

reporter   ~15704

I'm afraid I won't have a lot of time available to help you on this bug which has certainly been fixed a long time ago: I'm very sorry, but I have very little time and plenty of current bug waiting for me.

Indeed the piece of JavaScript code you're quoting is faulty and results in making all Javascript call to the condition evaluator fail.

The reason is that the conditions are incorrect in database, mostly referencing bad questions ID or inexsistent Token-Attributes.
I don't know how this became corrupted, but this clearly the origin of the bug.

What I can say, is that once it is working, it will never appear during data collection (only edition of the survey can lead to such corruption).

Sorry I can't help more.

Thibault

Issue History

Date Modified Username Field Change
2011-07-01 20:04 gwwri New Issue
2011-07-01 20:04 gwwri Status new => assigned
2011-07-01 20:04 gwwri Assigned To => lemeur
2011-07-01 20:04 gwwri File Added: survey with buggy conditions on one group.csv
2011-07-07 19:23 gwwri Note Added: 15673
2011-07-07 20:13 gwwri Note Added: 15674
2011-07-09 19:56 lemeur Note Added: 15704
2011-07-09 19:56 lemeur Status assigned => closed
2011-07-09 19:56 lemeur Resolution open => fixed