View Issue Details

This bug affects 1 person(s).
 10
IDProjectCategoryView StatusLast Update
06852Bug reportsSurvey participants (Tokens)public2012-11-20 13:19
ReporterNut Assigned Tojcleeland  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version2.00+ 
Fixed in Version2.00+ 
Summary06852: Opening Central participant database/panel produces error
Description

If you want to open the Central participant database/panel (Token Management > Central participant database/panel) clicking the icon produces an error:

CDbException (Error 500)
Could not process your query

Clicking the "OK" button on the error message closes it, with no participants shown.

Additional Information

If you click the "Add to survey" button (although it will say "Add participants to survey (0)"), select your survey from the list and click "Next", click "continue" on the "Map your participant attributes to an existing token attribute or create a new one" screen the Survey Participants will be shown as you would have expected when you first clicked the button to open Central participant database/panel.

Adding/deleting from the Survey Participants seems to work fine.

TagsNo tags attached.
Attached Files
Bug heat10
Complete LimeSurvey version number (& build)121106
I will donate to the project if issue is resolvedNo
BrowserIE / Chrome / FF
Database type & versionMySQL 5.1.61
Server OS (if known)RHEL 6.1
Webserver software & version (if known)Apache 2.2.15
PHP Version5.3.3

Users monitoring this issue

pfpDave

Activities

dholeman

dholeman

2012-11-12 09:13

reporter   ~22080

I have the same problem - participants are not displayed, json error 500.

Importing 1200 records from .csv into the participant database worked ok. The data was present in the _participants table after import with no apparent corruption.

Adding participants manually works too.

I traced the error back as far as participants.php | getParticipants() but lost it in the jquery & mysql abstraction layers.

pfpDave

pfpDave

2012-11-16 11:55

reporter   ~22262

I suspect this is the same issue I've just found and is due to line 844 in \application\models\participants.php placing double quotes around field values instead of single quotes ie this:

$participantdata = Yii::app()->db->createCommand()->select('firstname,lastname,email,language,blacklisted')->where('participant_id = "' . $participant . '"')->from('{{participants}}');

should be this:

$participantdata = Yii::app()->db->createCommand()->select('firstname,lastname,email,language,blacklisted')->where('participant_id = \'' . $participant . '\'')->from('{{participants}}');

There also appears to be another issue a couple of lines down in that this:

$query = Yii::app()->db->createCommand()->select('*')->from('{{tokens_' . $surveyid . '}}')->where('firstname = "' . $tobeinserted['firstname'] . '" AND lastname = "' . $tobeinserted['lastname'] . '" AND email = "' . $tobeinserted['email'] . '"')->queryAll();

should be this:

$query = Yii::app()->db->createCommand()->select('*')->from('{{tokens_' . $surveyid . '}}')->where('firstname = \'' . $tobeinserted['firstname'] . '\' AND lastname = \'' . $tobeinserted['lastname'] . '\' AND email = \'' . $tobeinserted['email'] . '\'')->queryAll();

pfpDave

pfpDave

2012-11-16 11:59

reporter   ~22263

A quick search through the participants.php file shows this to be the case on several other lines too: 268, 277, 313 & 334

jcleeland

jcleeland

2012-11-17 01:46

reporter   ~22294

These lines have been corrected and updated by Carsten in revision Revision: 1b431ec, since I can't replicate the issue if either of you can test this on the dev version, please do so and see if it resolves the issue.

Nut

Nut

2012-11-17 03:27

reporter   ~22298

I uploaded new participants.php file, this solved my issue.

Thanks

dholeman

dholeman

2012-11-17 03:33

reporter   ~22299

Comfort Update a couple days ago solved my problem, sorry for the delay reporting it. I'm up to date with stable release and it still works ok, 1200 records added and functioning although I only the three required fields were present in the imported csv so I did not test attribute fields.

pfpDave

pfpDave

2012-11-19 10:11

reporter   ~22311

I can now add participants to surveys from the central participant database panel using the new file, many thanks. There's still an issue with the new file however tracked in this log: http://bugs.limesurvey.org/view.php?id=6889

Issue History

Date Modified Username Field Change
2012-11-12 01:38 Nut New Issue
2012-11-12 01:38 Nut File Added: limesurvey_survey_878776.lss
2012-11-12 09:13 dholeman Note Added: 22080
2012-11-12 09:14 c_schmitz Assigned To => jcleeland
2012-11-12 09:14 c_schmitz Status new => assigned
2012-11-16 11:55 pfpDave Note Added: 22262
2012-11-16 11:59 pfpDave Note Added: 22263
2012-11-16 13:03 pfpDave Issue Monitored: pfpDave
2012-11-17 01:46 jcleeland Note Added: 22294
2012-11-17 01:46 jcleeland Status assigned => feedback
2012-11-17 03:27 Nut Note Added: 22298
2012-11-17 03:27 Nut Status feedback => assigned
2012-11-17 03:33 dholeman Note Added: 22299
2012-11-17 04:42 jcleeland Status assigned => resolved
2012-11-17 04:42 jcleeland Fixed in Version => 2.00+
2012-11-17 04:42 jcleeland Resolution open => fixed
2012-11-19 10:11 pfpDave Note Added: 22311
2012-11-20 13:19 c_schmitz Status resolved => closed
2016-12-08 10:39 c_schmitz Category Tokens => Survey participants (Tokens)
2021-08-18 09:11 guest Bug heat 8 => 10