View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
06996Bug reportsCentral participant databasepublic2013-01-15 14:12
Reporteri_meyer Assigned Tomdekker  
PrioritynormalSeverityblock 
Status closedResolutionfixed 
Product Version2.00+ 
Fixed in Version2.00+ 
Summary06996: Error due to composite primary key on participant_attribute_names on pqsql
Description

When trying to add a user to a survey (on page: /limesurvey/index.php/admin/participants/displayParticipants) an SQL-Error occured.

Steps To Reproduce

Make a survey, add some users, add a token to the survey, try to add users to the survey.

Additional Information

I think the error is because of joining "attribute_id" with "attribute_type" as shown in the SQL-Statement below:

Internal Server Error
CDbCommand failed to execute the SQL statement: SQLSTATE[42883]: Undefined function: 7 ERROR: operator does not exist: integer = character varying
LINE 1: ...("participant_attribute_names_lang"."attribute_id"="t"."attr...
^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts..

The SQL statement executed was:
SELECT "t"."attribute_id" AS "t0_c0", "t"."attribute_type" AS "t0_c1", "t"."visible" AS "t0_c2", "participant_attribute_names_lang"."attribute_id" AS "t1_c0", "participant_attribute_names_lang"."attribute_name" AS "t1_c1", "participant_attribute_names_lang"."lang" AS "t1_c2" FROM "participant_attribute_names" "t" LEFT OUTER JOIN "participant_attribute_names_lang" "participant_attribute_names_lang" ON ("participant_attribute_names_lang"."attribute_id"="t"."attribute_type")

Stacktrace:
#0 /var/www/limesurvey/framework/db/CDbCommand.php(499): PDOStatement->execute()
#1 /var/www/limesurvey/framework/db/CDbCommand.php(392): CDbCommand->queryInternal('fetchAll', Array, Array)
#2 /var/www/limesurvey/framework/db/ar/CActiveFinder.php(818): CDbCommand->queryAll()
#3 /var/www/limesurvey/framework/db/ar/CActiveFinder.php(452): CJoinElement->runQuery(Object(CJoinQuery))
#4 /var/www/limesurvey/framework/db/ar/CActiveFinder.php(70): CJoinElement->find(Object(CDbCriteria))
#5 /var/www/limesurvey/framework/db/ar/CActiveRecord.php(1292): CActiveFinder->query(Object(CDbCriteria), true)
#6 /var/www/limesurvey/framework/db/ar/CActiveRecord.php(1406): CActiveRecord->query(Object(CDbCriteria), true)
#7 /var/www/limesurvey/application/models/ParticipantAttributeNames.php(241): CActiveRecord->findAll(Object(CDbCriteria))
#8 /var/www/limesurvey/application/controllers/admin/participantsaction.php(1816): ParticipantAttributeNames->getAttributes()
#9 [internal function]: participantsaction->attributeMap()
#10 /var/www/limesurvey/framework/web/actions/CAction.php(107): ReflectionMethod->invokeArgs(Object(participantsaction), Array)
#11 /var/www/limesurvey/application/core/Survey_Common_Action.php(82): CAction->runWithParamsInternal(Object(participantsaction), Object(ReflectionMethod), Array)
#12 /var/www/limesurvey/framework/web/CController.php(309): Survey_Common_Action->runWithParams(Array)
#13 /var/www/limesurvey/framework/web/CController.php(287): CController->runAction(Object(participantsaction))
#14 /var/www/limesurvey/framework/web/CController.php(266): CController->runActionWithFilters(Object(participantsaction), Array)
#15 /var/www/limesurvey/application/controllers/AdminController.php(159): CController->run('participants')
#16 /var/www/limesurvey/framework/web/CWebApplication.php(276): AdminController->run('participants')
#17 /var/www/limesurvey/framework/web/CWebApplication.php(135): CWebApplication->runController('admin/participa...')
#18 /var/www/limesurvey/framework/base/CApplication.php(162): CWebApplication->processRequest()
#19 /var/www/limesurvey/index.php(178): CApplication->run()
#20 {main}

TagsNo tags attached.
Attached Files
Bug heat4
Complete LimeSurvey version number (& build)121127
I will donate to the project if issue is resolvedNo
BrowserFirefox 17
Database type & versionPostgreSQL 9.1.5
Server OS (if known)Ubuntu 64bit (wheezy/sid)
Webserver software & version (if known)Apache 2.0
PHP Version5.3.10-1ubuntu3.4

Relationships

related to 06707 closedmdekker Can not add participants from central participant database to surveys 

Users monitoring this issue

getter

Activities

mdekker

mdekker

2013-01-07 14:25

reporter   ~23514

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

mdekker

mdekker

2013-01-07 14:25

reporter   ~23515

Fix needs to be checked on systems other than mysql.

mdekker

mdekker

2013-01-15 14:11

reporter   ~23687

Fix committed to 2.1 branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=11262

mdekker

mdekker

2013-01-15 14:12

reporter   ~23688

Fix on master was already released, now added to create script and upgrade for 2.1

Related Changesets

LimeSurvey: master 0dc215da

2013-01-07 14:25

mdekker


Details Diff
Fixed 06996: Error due to composite primary key on participant_attribute_names on pqsql Affected Issues
06996
mod - application/models/ParticipantAttributeNames.php Diff File

LimeSurvey: 2.1 8894fec0

2013-01-15 14:11

mdekker


Details Diff
Fixed 06996: Error due to composite primary key on participant_attribute_names on pqsql Affected Issues
06996
mod - application/helpers/update/updatedb_helper.php Diff File
mod - installer/sql/create-mssql.sql Diff File
mod - installer/sql/create-mysql.sql Diff File
mod - installer/sql/create-pgsql.sql Diff File

Issue History

Date Modified Username Field Change
2012-11-30 12:13 i_meyer New Issue
2012-11-30 12:13 i_meyer Status new => assigned
2012-11-30 12:13 i_meyer Assigned To => jcleeland
2012-11-30 12:13 i_meyer File Added: limesurvey_survey_291756.lss
2012-12-03 09:52 getter Issue Monitored: getter
2012-12-12 13:33 mdekker Relationship added has duplicate 06707
2012-12-12 13:34 mdekker Status assigned => closed
2012-12-12 13:34 mdekker Resolution open => duplicate
2013-01-07 14:21 mdekker Assigned To jcleeland => mdekker
2013-01-07 14:21 mdekker Status closed => feedback
2013-01-07 14:21 mdekker Resolution duplicate => reopened
2013-01-07 14:21 mdekker Relationship replaced related to 06707
2013-01-07 14:25 mdekker Changeset attached => LimeSurvey master 0dc215da
2013-01-07 14:25 mdekker Note Added: 23514
2013-01-07 14:25 mdekker Summary SQL-Error by adding a user to a survey => Error due to composite primary key on participant_attribute_names on pqsql
2013-01-07 14:25 mdekker Note Added: 23515
2013-01-15 14:11 mdekker Changeset attached => LimeSurvey 2.1 8894fec0
2013-01-15 14:11 mdekker Note Added: 23687
2013-01-15 14:12 mdekker Note Added: 23688
2013-01-15 14:12 mdekker Status feedback => closed
2013-01-15 14:12 mdekker Resolution reopened => fixed
2013-01-15 14:12 mdekker Fixed in Version => 2.00+
2021-08-02 18:17 guest Bug heat 2 => 4