View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
07938 | Bug reports | Survey taking | public | 2013-06-19 16:23 | 2013-08-04 21:54 |
Reporter | pierro | Assigned To | DenisChenu | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 2.00+ | ||||
Fixed in Version | 2.00+ | ||||
Summary | 07938: Can't display Array (texts) answer | ||||
Description | Hi everyone, I just created a survey wich contains an "Array (texts)" question with a few answer. I will join a little questionnaire with the same bug. The thing is when i want to get to this question in my survey, or even when previewing the question, I got this error "Error: There are no answer options for this question and/or they don't exist in this language.". I'm using French language. After I doubled checked my language configuration, I started to look into the application's code and went into application/helpers/qanda_helper.php at line 5547, when the error is displayed. There is a test at line 5349 which will display this error if no lines are returned by the query. The thing is when I print this query and run it into my MySQL database I got 2 lines returned, and when I print the "$lresult->readAll()" function I got my 2 lines displayed. I don't know wich files or DB dumps or even survey I could add to help you find / reproduce this. I find a work around by turning the if into "if($lresult->readAll() != "")" but I would like to have a proper fix / solution. | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Bug heat | 8 | ||||
Complete LimeSurvey version number (& build) | 130514 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | |||||
Database type & version | Mysql 5.0.37 | ||||
Server OS (if known) | Red Hat Enterprise Linux Server release 5.4 (Tikanga) | ||||
Webserver software & version (if known) | Apache 2.2.3 | ||||
PHP Version | 5.1.6 | ||||
Strange, Because i can not reproduce. Maybe some session issue : test with click on survey logic file "dmin/expressions/sa/survey_logic_file/sid/{surveyid} before testing |
|
I can not reproduce this issue on MySQL using the activated survey you attached. The single question load fine without any errors. Are you sure that you are running MySQL and not MS SQL? Because this sounds similar to http://bugs.limesurvey.org/view.php?id=7962 |
|
Hi, First i thank you guys for trying to help. I figured out something that might explained the problem : http://www.yiiframework.com/doc/api/1.1/CDbDataReader#getRowCount-detail In the link I gave you it's said that you should not use the getRowCount function (basically the one called when doing count($lresult)) of the datareader with a select query. So I changed the qanda_helper file to get all the datas into an array with the readAll() function and then I'm counting the array size. I will attach the file so you can take a look at it (l5349 to 5361). It's now working well for me. |
|
Sam, can you check if any code modification is required at the LS core?! |
|
pierro : next time : better is to post a "diff" file or even better : do a pull request on github. Denis |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=12721 |
|
Please pierro : can you test with last commit if it fix. |
|
Fix committed to 2.05 branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=12722 |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=12724 |
|
Fix committed to 2.05 branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=12725 |
|
Please test with last qanda_helper (you can use GIT or replace your qanda_helper.php with the new one: |
|
I replace my qanda_helper with the one you linked. It's working fine. |
|
Great, Thanks for replying :) |
|
2.00+ Build 130802 released |
|
LimeSurvey: master a967b589 2013-07-11 21:32 Details Diff |
Fixed issue 07938: Can't display Array (texts) answer with some SQL server Dev: quick fix, because Question object for 2.1 |
Affected Issues 07938 |
|
mod - application/helpers/qanda_helper.php | Diff File | ||
LimeSurvey: 2.05 1e5e2e62 2013-07-11 21:35 Details Diff |
Fixed issue 07938: Can't display Array (texts) answer with some SQL server Dev: quick fix, because Question object for 2.1 |
Affected Issues 07938 |
|
mod - application/helpers/qanda_helper.php | Diff File | ||
LimeSurvey: master c7a661af 2013-07-12 10:06 Details Diff |
Dev: Fixed issue 07938 for whole $labelans part Dev: removed warnings , thanks to @mennodekker |
Affected Issues 07938 |
|
mod - application/helpers/qanda_helper.php | Diff File | ||
LimeSurvey: 2.05 7ba4df24 2013-07-12 10:12 Details Diff |
Dev: Fixed issue 07938 for whole $labelans part Dev: removed warnings , thanks to @mennodekker |
Affected Issues 07938 |
|
mod - application/helpers/qanda_helper.php | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2013-06-19 16:23 | pierro | New Issue | |
2013-06-19 16:23 | pierro | File Added: bugLimeSurvey.lss | |
2013-06-30 17:35 | DenisChenu | Note Added: 25692 | |
2013-07-04 09:55 | Mazi | Note Added: 25705 | |
2013-07-04 09:59 | Mazi | Note Edited: 25705 | |
2013-07-09 16:45 | pierro | Note Added: 25746 | |
2013-07-09 16:46 | pierro | Note Edited: 25746 | |
2013-07-09 16:47 | pierro | File Added: qanda_helper.php | |
2013-07-09 16:57 | Mazi | Assigned To | => sammousa |
2013-07-09 16:57 | Mazi | Status | new => assigned |
2013-07-09 16:57 | Mazi | Note Added: 25747 | |
2013-07-11 19:55 | DenisChenu | Assigned To | sammousa => DenisChenu |
2013-07-11 19:55 | DenisChenu | Note Added: 25756 | |
2013-07-11 19:57 | DenisChenu | Note Edited: 25756 | |
2013-07-11 21:36 | DenisChenu | Changeset attached | => LimeSurvey master a967b589 |
2013-07-11 21:36 | DenisChenu | Note Added: 25761 | |
2013-07-11 21:36 | DenisChenu | Resolution | open => fixed |
2013-07-11 21:37 | DenisChenu | Note Added: 25762 | |
2013-07-11 21:39 | DenisChenu | Changeset attached | => LimeSurvey 2.05 1e5e2e62 |
2013-07-11 21:39 | DenisChenu | Note Added: 25763 | |
2013-07-12 10:10 | DenisChenu | Changeset attached | => LimeSurvey master c7a661af |
2013-07-12 10:10 | DenisChenu | Note Added: 25764 | |
2013-07-12 10:17 | DenisChenu | Changeset attached | => LimeSurvey 2.05 7ba4df24 |
2013-07-12 10:17 | DenisChenu | Note Added: 25765 | |
2013-07-12 10:19 | DenisChenu | Note Added: 25766 | |
2013-07-12 10:19 | DenisChenu | Status | assigned => resolved |
2013-07-12 10:19 | DenisChenu | Fixed in Version | => 2.00+ |
2013-07-15 11:38 | pierro | Note Added: 25792 | |
2013-07-15 12:09 | DenisChenu | Note Added: 25793 | |
2013-08-04 21:54 | c_schmitz | Note Added: 25920 | |
2013-08-04 21:54 | c_schmitz | Status | resolved => closed |