View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
08117Bug reportsConditionspublic2013-09-04 13:50
Reporterkbarrientos Assigned Tomdekker  
PrioritynormalSeveritypartial_block 
Status closedResolutionunable to reproduce 
Product Version2.00+ 
Summary08117: Getting an error message when pressing the conditioning button
Description

Getting an error message when pressing the conditioning button to set a condition for a particular question. Please refer to the attached screenshot in reference to the error message. Also attached a simple survey for testing purposes.

Steps To Reproduce
  1. Import test survey (testsurvey)
  2. Choose survey (testsurvey)
  3. Go to A4 Group
  4. Go to A_Q4c question
  5. Click the conditioning button to see the error
TagsNo tags attached.
Attached Files
condition.jpg (91,898 bytes)   
condition.jpg (91,898 bytes)   
sc1.jpg (90,752 bytes)   
sc1.jpg (90,752 bytes)   
sc2.jpg (115,492 bytes)
cond_q9.PNG (15,286 bytes)   
cond_q9.PNG (15,286 bytes)   
Bug heat8
Complete LimeSurvey version number (& build)130708
I will donate to the project if issue is resolvedNo
Browserfirefox and chrome
Database type & versionMySQL 5.0.92-50-log
Server OS (if known)Red Hat Enterprise Linux Server release 5.3
Webserver software & version (if known)Apache/2.2.3 (CentOS)
PHP VersionPHP Version 5.1.6

Relationships

related to 08108 closedMazi Importing question(.lsq file) 
related to 08109 closedMazi Copying a question 

Users monitoring this issue

There are no users monitoring this issue.

Activities

Mazi

Mazi

2013-08-30 20:24

updater   ~26114

How did you add the condition? Via the condition editor or by entering your own expression at the "Relevance equation field" at the question?

If the later, you need to use question codes instead of SGQA identifiers, e.g.:
((questioncode.NAOK == "1")), assuming that "questioncode is the code of the previous question.

mmirasol

mmirasol

2013-09-03 11:24

reporter   ~26136

hi dr. minke.
[5:13:45 PM] Mark Mirasol: with regards to http://bugs.limesurvey.org/view.php?id=8117
[5:14:22 PM] Mark Mirasol: we are working with a survey that was exported from limesurvey 1.92 and imported into lime 2.0
[5:15:37 PM] Mark Mirasol: we have the same survey on both instances of lime
[5:15:53 PM] Mark Mirasol: but we are getting the error when we are trying to view the conditions in lime 2.0

mmirasol

mmirasol

2013-09-03 11:37

reporter   ~26137

limesurvey_survey_88752.lss [^] (3,116,311 bytes) 2013-09-03 11:22

  • this is the survey we exported from 1.92.
    steps to replicate are as follows:
    1. import .lss file in lime 2.0.
    2. select survey 130604.
    3. select group SV1:Q8_Q9.
    4. select question Q8 and click conditions editor (this should work).
    5. select question Q9 and it will give you the error shown.
Mazi

Mazi

2013-09-03 12:01

updater   ~26139

Last edited: 2013-09-03 12:02

I have imported survey #88752 (seem to be the one designed at LS2) and I am able to view the conditions of question Q9 without any problems, see attached screen shot.

  1. Are you sure about the PHP version being used? Because Limesurvey 2 requires a higher version if I remember correctly.

  2. Does the problem show up at the original survey as well or only when importing the 1.92 survey at Limesurvey 2?

  3. Please also run the logic file check to see if there are any problems with question codes or the like.

kbarrientos

kbarrientos

2013-09-03 12:36

reporter   ~26140

Hello Dr. Minke, is the screenshot you posted from lime 1.92 or lime 2.0? Please see my answers to your questions below.

  1. Yes. we are using 5.1.6

  2. We don't have this problem in 1.92. only in lime 2.0

  3. We run the integrity check and it showed no issues.

mmirasol

mmirasol

2013-09-03 17:17

reporter   ~26146

hi dr. minke.
[11:14:19 PM] Mark Mirasol: we're just trying to set the attribute to the connection object directly.
[11:15:08 PM] Mark Mirasol: can you tell us where the connection object to the database is?
[11:15:55 PM] Mark Mirasol: we're trying to do something like this to fix the error.
[11:15:56 PM] Mark Mirasol:
try {
$conn = new PDO("mysql:host=$hostname;dbname=esma", $username, $password);
$conn->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, 1);
}
[11:16:17 PM] Mark Mirasol: can you tell us where the $conn object is defined in lime.

Mazi

Mazi

2013-09-04 10:37

updater   ~26151

Menno, this is the issue we talked about at the last dev meeting. Can you please check if the following fix sounds appropriate and if so, apply it to the current 2.0 branch:

At /framework/db/CDbConnection.php line 437 add:
$pdo->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, 1);

I am not that familiar with these DB details so I'd be happy if you can check and apply this small fix.

Thanks!

mdekker

mdekker

2013-09-04 12:25

reporter   ~26156

This is a workaround, not a solution. The workaround states that 'if your code is only going to run against mysql you can...' but we also support mssql, pgsql so this is not a fix. But only when we can reproduce this using the latest version, we will be able to fix the problem.

Most of the time it is due to leaving a query open and then performing another one. We used to have a lot of this errors when we moved to Yii but I think most of them were fixed. Maybe some files of the installation are old or some rare condition with the php version causes some other program flow. Only way to find out is by having the reporter(s) enable debug mode level 2 and not use the workaround.

Mazi

Mazi

2013-09-04 13:50

updater   ~26157

Thanks for your feedback, Menno.

I will close this one since it is solved for the user but unable to reproduce on any of my systems.

Issue History

Date Modified Username Field Change
2013-08-30 13:18 kbarrientos New Issue
2013-08-30 13:18 kbarrientos File Added: condition.jpg
2013-08-30 13:20 kbarrientos File Added: limesurvey_survey_233968(2).lss
2013-08-30 20:24 Mazi Assigned To => Mazi
2013-08-30 20:24 Mazi Status new => assigned
2013-08-30 20:24 Mazi Note Added: 26114
2013-08-30 20:24 Mazi Status assigned => feedback
2013-09-03 11:16 kbarrientos File Added: sc1.jpg
2013-09-03 11:17 kbarrientos File Added: sc2.jpg
2013-09-03 11:22 kbarrientos File Added: limesurvey_survey_88752.lss
2013-09-03 11:24 mmirasol Note Added: 26136
2013-09-03 11:37 mmirasol Note Added: 26137
2013-09-03 12:01 Mazi Note Added: 26139
2013-09-03 12:01 Mazi File Added: cond_q9.PNG
2013-09-03 12:02 Mazi Note Edited: 26139
2013-09-03 12:36 kbarrientos Note Added: 26140
2013-09-03 12:36 kbarrientos Status feedback => assigned
2013-09-03 17:17 mmirasol Note Added: 26146
2013-09-04 10:37 Mazi Note Added: 26151
2013-09-04 10:37 Mazi Assigned To Mazi => mdekker
2013-09-04 12:04 mdekker Relationship added related to 08108
2013-09-04 12:25 mdekker Note Added: 26156
2013-09-04 12:34 DenisChenu Relationship added related to 08109
2013-09-04 13:50 Mazi Note Added: 26157
2013-09-04 13:50 Mazi Status assigned => closed
2013-09-04 13:50 Mazi Resolution open => unable to reproduce