I am encountering a 500 server error when trying to upload a CSV that has custom attributes and I'd like to overwrite those attributes with the values from the CSV file. Here is the header of my CSV file:
If I don't check the "Overwrite existing participant attribute values if a duplicate participant is found?" box the import succeeds. If I do and look at the network logs I see the following PHP error being returned (see below). This is on LimeSurvey 6.5.15. Any thoughts on how to fix this error would be greatly appreciated as we really need the ability to import and export custom attributes to make CPDB useful at all.
Code:
{
"success": false,
"message": "Property \"Participant.cohort\" is not defined.",
"error": {
"code": 500,
"type": "CException",
"errorCode": 0,
"message": "Property \"Participant.cohort\" is not defined.",
"file": "\/var\/www\/limesurvey\/vendor\/yiisoft\/yii\/framework\/db\/ar\/CActiveRecord.php",
"line": 162,
"trace": "#0 \/var\/www\/limesurvey\/vendor\/yiisoft\/yii\/framework\/db\/ar\/CActiveRecord.php(162): CComponent->__set()\n#1 \/var\/www\/limesurvey\/application\/controllers\/admin\/ParticipantsAction.php(1037): CActiveRecord->__set()\n#2 [internal function]: ParticipantsAction->uploadCSV()\n#3 \/var\/www\/limesurvey\/vendor\/yiisoft\/yii\/framework\/web\/actions\/CAction.php(114): ReflectionMethod->invokeArgs()\n#4 \/var\/www\/limesurvey\/application\/core\/SurveyCommonAction.php(83): CAction->runWithParamsInternal()\n#5 \/var\/www\/limesurvey\/application\/controllers\/admin\/ParticipantsAction.php(73): SurveyCommonAction->runWithParams()\n#6 \/var\/www\/limesurvey\/vendor\/yiisoft\/yii\/framework\/web\/CController.php(308): ParticipantsAction->runWithParams()\n#7 \/var\/www\/limesurvey\/vendor\/yiisoft\/yii\/framework\/web\/CController.php(286): CController->runAction()\n#8 \/var\/www\/limesurvey\/vendor\/yiisoft\/yii\/framework\/web\/CController.php(265): CController->runActionWithFilters()\n#9 \/var\/www\/limesurvey\/application\/controllers\/AdminController.php(202): CController->run()\n#10 \/var\/www\/limesurvey\/vendor\/yiisoft\/yii\/framework\/web\/CWebApplication.php(282): AdminController->run()\n#11 \/var\/www\/limesurvey\/vendor\/yiisoft\/yii\/framework\/web\/CWebApplication.php(141): CWebApplication->runController()\n#12 \/var\/www\/limesurvey\/vendor\/yiisoft\/yii\/framework\/base\/CApplication.php(185): CWebApplication->processRequest()\n#13 \/var\/www\/limesurvey\/index.php(161): CApplication->run()\n#14 {main}",
"traces": [
{
"file": "\/var\/www\/limesurvey\/vendor\/yiisoft\/yii\/framework\/db\/ar\/CActiveRecord.php",
"line": 162,
"function": "__set",
"class": "CComponent",
"type": "->"
},
{
"file": "\/var\/www\/limesurvey\/application\/controllers\/admin\/ParticipantsAction.php",
"line": 1037,
"function": "__set",
"class": "CActiveRecord",
"type": "->"
},
{
"function": "uploadCSV",
"class": "ParticipantsAction",
"type": "->",
"file": "unknown",
"line": 0
},
{
"file": "\/var\/www\/limesurvey\/vendor\/yiisoft\/yii\/framework\/web\/actions\/CAction.php",
"line": 114,
"function": "invokeArgs",
"class": "ReflectionMethod",
"type": "->"
},
{
"file": "\/var\/www\/limesurvey\/application\/core\/SurveyCommonAction.php",
"line": 83,
"function": "runWithParamsInternal",
"class": "CAction",
"type": "->"
},
{
"file": "\/var\/www\/limesurvey\/application\/controllers\/admin\/ParticipantsAction.php",
"line": 73,
"function": "runWithParams",
"class": "SurveyCommonAction",
"type": "->"
},
{
"file": "\/var\/www\/limesurvey\/vendor\/yiisoft\/yii\/framework\/web\/CController.php",
"line": 308,
"function": "runWithParams",
"class": "ParticipantsAction",
"type": "->"
},
{
"file": "\/var\/www\/limesurvey\/vendor\/yiisoft\/yii\/framework\/web\/CController.php",
"line": 286,
"function": "runAction",
"class": "CController",
"type": "->"
},
{
"file": "\/var\/www\/limesurvey\/vendor\/yiisoft\/yii\/framework\/web\/CController.php",
"line": 265,
"function": "runActionWithFilters",
"class": "CController",
"type": "->"
},
{
"file": "\/var\/www\/limesurvey\/application\/controllers\/AdminController.php",
"line": 202,
"function": "run",
"class": "CController",
"type": "->"
},
{
"file": "\/var\/www\/limesurvey\/vendor\/yiisoft\/yii\/framework\/web\/CWebApplication.php",
"line": 282,
"function": "run",
"class": "AdminController",
"type": "->"
},
{
"file": "\/var\/www\/limesurvey\/vendor\/yiisoft\/yii\/framework\/web\/CWebApplication.php",
"line": 141,
"function": "runController",
"class": "CWebApplication",
"type": "->"
},
{
"file": "\/var\/www\/limesurvey\/vendor\/yiisoft\/yii\/framework\/base\/CApplication.php",
"line": 185,
"function": "processRequest",
"class": "CWebApplication",
"type": "->"
},
{
"file": "\/var\/www\/limesurvey\/index.php",
"line": 161,
"function": "run",
"class": "CApplication",
"type": "->"
}
]
}
}