View Issue Details

IDProjectCategoryView StatusLast Update
15571Bug reports[All Projects] Central participant databasepublic2019-12-04 11:43
Reportercdorin Assigned Topstelling  
PrioritynoneSeverityminor 
Status assignedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary15571: CPDB - cannot use the search boxes below associated to the additional attributes
Description

Create additional attributes in CPDB - try to filter users using the search boxes located below the additional columns -> you will get an error:

TagsNo tags attached.
Complete LimeSurvey version number (& build)irrelevant
I will donate to the project if issue is resolvedNo
Browser
Database & DB-Versionirrelevant
Server OS (if known)
Webserver software & version (if known)
PHP Versionirrelevant

Activities

cdorin

cdorin

2019-11-14 20:05

manager  

Selection_303.png (107,622 bytes)
eddylackmann

eddylackmann

2019-11-19 08:27

developer   ~54666

Last edited: 2019-11-19 08:27

View 2 revisions

@cdorin

I can't reproduce this. Works fine on my machine :D !

cdorin

cdorin

2019-11-25 16:55

manager   ~54777

Use 2-3 filters at the same time (additional + default ones). i get this error:



error_cpdb_multiple_filters (10,002 bytes)
Error 500: {"success":false,"message":"CDbCommand failed to execute the SQL statement: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens","error":{"code":500,"type":"CDbException","errorCode":0,"message":"CDbCommand failed to execute the SQL statement: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens","file":"\/var\/www\/devlimesurvey\/framework\/db\/CDbCommand.php","line":543,"trace":"#0 \/var\/www\/devlimesurvey\/framework\/db\/CDbCommand.php(433): CDbCommand->queryInternal('fetchColumn', 0, Array)\n#1 \/var\/www\/devlimesurvey\/framework\/db\/ar\/CActiveRecord.php(1609): CDbCommand->queryScalar()\n#2 \/var\/www\/devlimesurvey\/application\/core\/LSCActiveDataProvider.php(100): CActiveRecord->count(Object(CDbCriteria))\n#3 \/var\/www\/devlimesurvey\/framework\/web\/CDataProvider.php(224): LSCActiveDataProvider->calculateTotalItemCount()\n#4 \/var\/www\/devlimesurvey\/application\/core\/LSCActiveDataProvider.php(32): CDataProvider->getTotalItemCount()\n#5 \/var\/www\/devlimesurvey\/framework\/web\/CDataProvider.php(168): LSCActiveDataProvider->fetchData()\n#6 \/var\/www\/devlimesurvey\/framework\/zii\/widgets\/CBaseListView.php(125): CDataProvider->getData()\n#7 \/var\/www\/devlimesurvey\/framework\/zii\/widgets\/grid\/CGridView.php(339): CBaseListView->init()\n#8 \/var\/www\/devlimesurvey\/application\/extensions\/bootstrap\/widgets\/TbGridView.php(44): CGridView->init()\n#9 \/var\/www\/devlimesurvey\/framework\/web\/CBaseController.php(147): TbGridView->init()\n#10 \/var\/www\/devlimesurvey\/framework\/web\/CBaseController.php(181): CBaseController->createWidget('bootstrap.widge...', Array)\n#11 \/var\/www\/devlimesurvey\/application\/views\/admin\/participants\/displayParticipants_view.php(101): CBaseController->widget('bootstrap.widge...', Array)\n#12 \/var\/www\/devlimesurvey\/framework\/web\/CBaseController.php(126): require('\/var\/www\/devlim...')\n#13 \/var\/www\/devlimesurvey\/framework\/web\/CBaseController.php(95): CBaseController->renderInternal('\/var\/www\/devlim...', Array, true)\n#14 \/var\/www\/devlimesurvey\/framework\/web\/CController.php(872): CBaseController->renderFile('\/var\/www\/devlim...', Array, true)\n#15 \/var\/www\/devlimesurvey\/application\/controllers\/AdminController.php(222): CController->renderPartial('\/admin\/particip...', Array, true, false)\n#16 \/var\/www\/devlimesurvey\/application\/core\/Survey_Common_Action.php(274): AdminController->renderPartial('\/admin\/particip...', Array, true)\n#17 \/var\/www\/devlimesurvey\/application\/core\/Survey_Common_Action.php(354): Survey_Common_Action->renderCentralContents('participants', Array, Array)\n#18 \/var\/www\/devlimesurvey\/application\/controllers\/admin\/participantsaction.php(98): Survey_Common_Action->_renderWrappedTemplate('participants', Array, Array, false)\n#19 \/var\/www\/devlimesurvey\/application\/controllers\/admin\/participantsaction.php(395): participantsaction->_renderWrappedTemplate('participants', Array, Array)\n#20 [internal function]: participantsaction->displayParticipants()\n#21 \/var\/www\/devlimesurvey\/framework\/web\/actions\/CAction.php(109): ReflectionMethod->invokeArgs(Object(participantsaction), Array)\n#22 \/var\/www\/devlimesurvey\/application\/core\/Survey_Common_Action.php(86): CAction->runWithParamsInternal(Object(participantsaction), Object(ReflectionMethod), Array)\n#23 \/var\/www\/devlimesurvey\/application\/controllers\/admin\/participantsaction.php(71): Survey_Common_Action->runWithParams(Array)\n#24 \/var\/www\/devlimesurvey\/framework\/web\/CController.php(308): participantsaction->runWithParams(Array)\n#25 \/var\/www\/devlimesurvey\/framework\/web\/CController.php(286): CController->runAction(Object(participantsaction))\n#26 \/var\/www\/devlimesurvey\/framework\/web\/CController.php(265): CController->runActionWithFilters(Object(participantsaction), Array)\n#27 \/var\/www\/devlimesurvey\/application\/controllers\/AdminController.php(165): CController->run('participants')\n#28 \/var\/www\/devlimesurvey\/framework\/web\/CWebApplication.php(282): AdminController->run('participants')\n#29 \/var\/www\/devlimesurvey\/framework\/web\/CWebApplication.php(141): CWebApplication->runController('admin\/participa...')\n#30 \/var\/www\/devlimesurvey\/framework\/base\/CApplication.php(185): CWebApplication->processRequest()\n#31 \/var\/www\/devlimesurvey\/index.php(195): CApplication->run()\n#32 {main}","traces":[{"file":"\/var\/www\/devlimesurvey\/framework\/db\/CDbCommand.php","line":433,"function":"queryInternal","class":"CDbCommand","type":"->","args":["fetchColumn",0,[]]},{"file":"\/var\/www\/devlimesurvey\/framework\/db\/ar\/CActiveRecord.php","line":1609,"function":"queryScalar","class":"CDbCommand","type":"->","args":[]},{"file":"\/var\/www\/devlimesurvey\/application\/core\/LSCActiveDataProvider.php","line":100,"function":"count","class":"CActiveRecord","type":"->","args":[{"select":["t.*","shares.share_uid","shares.date_added","shares.can_edit","(SELECT COUNT(*) FROM {{survey_links}} cas WHERE cas.participant_id = t.participant_id ) AS countActiveSurveys","t.participant_id AS id"],"distinct":false,"condition":"(t.firstname LIKE :ycp0) AND (t.participant_id IN (SELECT DISTINCT `pa`.`participant_id`\nFROM `lime_participant_attribute` `pa`\nWHERE attribute_id = '8' AND value LIKE '%asd%'))","params":{":ycp0":"%ted%",":attribute_id8":8},"limit":-1,"offset":-1,"order":"","group":"","join":"LEFT JOIN {{participant_shares}} AS shares ON t.participant_id = shares.participant_id AND (shares.share_uid = 1 OR shares.share_uid = -1)","having":"","with":null,"alias":null,"together":null,"index":null,"scopes":null}]},{"file":"\/var\/www\/devlimesurvey\/framework\/web\/CDataProvider.php","line":224,"function":"calculateTotalItemCount","class":"LSCActiveDataProvider","type":"->","args":[]},{"file":"\/var\/www\/devlimesurvey\/application\/core\/LSCActiveDataProvider.php","line":32,"function":"getTotalItemCount","class":"CDataProvider","type":"->","args":[]},{"file":"\/var\/www\/devlimesurvey\/framework\/web\/CDataProvider.php","line":168,"function":"fetchData","class":"LSCActiveDataProvider","type":"->","args":[]},{"file":"\/var\/www\/devlimesurvey\/framework\/zii\/widgets\/CBaseListView.php","line":125,"function":"getData","class":"CDataProvider","type":"->","args":[]},{"file":"\/var\/www\/devlimesurvey\/framework\/zii\/widgets\/grid\/CGridView.php","line":339,"function":"init","class":"CBaseListView","type":"->","args":[]},{"file":"\/var\/www\/devlimesurvey\/application\/extensions\/bootstrap\/widgets\/TbGridView.php","line":44,"function":"init","class":"CGridView","type":"->","args":[]},{"file":"\/var\/www\/devlimesurvey\/framework\/web\/CBaseController.php","line":147,"function":"init","class":"TbGridView","type":"->","args":[]},{"file":"\/var\/www\/devlimesurvey\/framework\/web\/CBaseController.php","line":181,"function":"createWidget","class":"CBaseController","type":"->","args":["bootstrap.widgets.TbGridView",{"id":"list_central_participants","emptyText":"No participants found.","itemsCssClass":"table table-responsive table-striped","dataProvider":{"modelClass":"Participant","model":{"lastname":"","firstname":"ted","email":"","language":"","owner_uid":"","blacklisted":"","created":"","participant_id":null,"created_by":null,"modified":null},"keyAttribute":null},"columns":[{"name":"checkbox","type":"raw","header":"<input type='checkbox' id='action_toggleAllParticipant' \/>","filter":false},{"name":"buttons","type":"raw","header":"Action","filter":false},{"name":"lastname"},{"name":"firstname"},{"name":"email"},{"name":"language","value":"getLanguageNameFromCode($data->language, false)","filter":{"":"","af":"Afrikaans"}},{"name":"countActiveSurveys","value":"$data->getCountActiveSurveys()","header":"Active surveys","htmlOptions":{"width":"80px"}},{"name":"owner.full_name","header":"Owner","filter":"<select class=\"form-control\" name=\"Participant[owner_uid]\" id=\"Participant_owner_uid\">\n<option value=\"\" selected=\"selected\"><\/option>\n<option value=\"1\">Administrator<\/option>\n<\/select>"},{"name":"blacklisted","value":"$data->getBlacklistSwitchbutton()","type":"raw","filter":{"N":"No","Y":"Yes"}},{"name":"created","value":"$data->createdFormatted","type":"raw"},{"value":"$data->getParticipantAttribute($this->id)","id":"ea_8","header":"dasdasdas","type":"html","filter":"<input class=\"form-control\" type=\"text\" value=\"asd\" name=\"extraAttribute[ea_8]\" id=\"extraAttribute_ea_8\" \/>"}],"rowHtmlOptionsExpression":"[\"data-participant_id\" => $data->id]","htmlOptions":{"class":"table-responsive"},"filter":{"lastname":"","firstname":"ted","email":"","language":"","owner_uid":"","blacklisted":"","created":"","participant_id":null,"created_by":null,"modified":null},"afterAjaxUpdate":"function(id, data){LS.CPDB.bindButtons;LS.CPDB.participantPanel();bindListItemclick();}","ajaxType":"POST","beforeAjaxUpdate":"insertSearchCondition","template":"{items}\n<div id='tokenListPager'><div class=\"col-sm-4\" id=\"massive-action-container\"><!-- Rendering massive action widget -->\n\n<!-- Massive actions widget : selector view -->\n<div class=\"pull-left dropup listActions\" data-pk=\"selectedParticipant\" data-grid-id=\"list_central_participants\" id=\"tokenListActions\">\n    <!-- Drop Up button selector -->\n    <button class=\"btn btn-default dropdown-toggle\" type=\"button\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"true\">\n      Selected participant(s)...    <span class=\"caret\"><\/span>\n    <\/button>\n\n    <!-- List of actions -->\n    <ul class=\"dropdown-menu listActions\" aria-labelledby=\"tokenListActions\">\n\n                    \n                <!-- Action -->\n                <li\n                                    >\n                    <a href=\"#\"\n                                                data-url=\"\/index.php?r=admin\/participants\/sa\/dele
ollehar

ollehar

2019-12-03 14:22

administrator   ~54914

Again, way too vague instructions on how to reproduce.

pstelling

pstelling

2019-12-04 11:43

developer   ~54945

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&amp;id=29276

Related Changesets

LimeSurvey: master 5fd36465

2019-11-28 14:55:09

pstelling

Details Diff
Fixed issue 15571: CPDB - cannot use the search boxes below associated to the additional attributes Affected Issues
15571
mod - application/models/Participant.php Diff File

Issue History

Date Modified Username Field Change
2019-11-14 20:05 cdorin New Issue
2019-11-14 20:05 cdorin File Added: Selection_303.png
2019-11-19 08:27 eddylackmann Note Added: 54666
2019-11-19 08:27 eddylackmann Note Edited: 54666 View Revisions
2019-11-20 14:16 eddylackmann Assigned To => eddylackmann
2019-11-20 14:16 eddylackmann Status new => assigned
2019-11-25 16:55 cdorin File Added: error_cpdb_multiple_filters
2019-11-25 16:55 cdorin Note Added: 54777
2019-12-03 14:22 ollehar Note Added: 54914
2019-12-04 11:43 pstelling Changeset attached => LimeSurvey master 5fd36465
2019-12-04 11:43 pstelling Note Added: 54945
2019-12-04 11:43 pstelling Assigned To eddylackmann => pstelling
2019-12-04 11:43 pstelling Resolution open => fixed