Anonymous Login
2016-09-28 13:55 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
06852Bug reports[All Projects] Tokenspublic2012-11-20 13:19
ReporterNut 
Assigned Tojcleeland 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
Product Version2.00+ 
Target VersionFixed in Version2.00+ 
Summary06852: Opening Central participant database/panel produces error
DescriptionIf 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 InformationIf 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.
Complete LimeSurvey version number (& build)121106
I will donate to the project if issue is resolvedNo
BrowserIE / Chrome / FF
Database & DB-VersionMySQL 5.1.61
Operating System (Server)RHEL 6.1
Webserver software & versionApache 2.2.15
PHP Version5.3.3
Attached Files

-Relationships
+Relationships

-Notes

~22080

dholeman (reporter)

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.

~22262

pfpDave (reporter)

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();

~22263

pfpDave (reporter)

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

~22294

jcleeland (reporter)

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.

~22298

Nut (reporter)

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

Thanks

~22299

dholeman (reporter)

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.

~22311

pfpDave (reporter)

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
+Notes

-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-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
+Issue History