View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
09004 | Bug reports | Central participant database | public | 2014-04-29 19:29 | 2014-05-02 15:10 |
Reporter | Ibistide | Assigned To | c_schmitz | ||
Priority | normal | Severity | partial_block | ||
Status | closed | Resolution | fixed | ||
Product Version | 2.05+ | ||||
Fixed in Version | 2.05+ | ||||
Summary | 09004: Cannot create new attributes with participant csv import | ||||
Description | I can upload CSV files of new participants into my database if I don't try to import fields as new attributes. But, if I do try to create a new participant attribute, I run into the following issue. The end result is that the 'attribute_name' value is empty and is not included in the SQL INSERT statement, and thus the new record in the table can't be created (because the column 'defaultname' is required.) If I try to add 2 new fields called "role" and "dateRegistered" with my participant import, when I press the "Continue" button, the page POSTs to the webserver the following info: Page: http://survey.citiprogram.org/index.php?r=admin/participants/sa/uploadCSV Then it sends the following command to MS SQL: declare @p1 int However, this fails with the following SQL error: Cannot insert the value NULL into column 'defaultname', table 'LIMESURVEY.dbo.participant_attribute_names'; column does not allow nulls. INSERT fails. The LimeSurvey interface itself doesn't display the error, it just shows "Processing" with a spinning green ring forever. The error is viewable in the 500 response from the webserver (using Chrome's inspector or Firefox's Firebug) & also logged on the SQL server. | ||||
Steps To Reproduce | Using the attached file "cantimportthesefields2.csv":
| ||||
Additional Information | I am not a programmer, so this is probably overreach on my part, but I guess I am having an issue in the file \application\controllers\admin\participantsaction.php where the $value is not being set to anything; and perhaps because $newarray itself was not set to anything. foreach ($newarray as $key => $value)
My guess is it might have to do with the values in the POST. Some of them match perfectly to the values that are being looked for starting at line 1152. For example, it's looking for $characterset = Yii::app()->request->getPost('characterset'); But, it's also looking for a $newarray = Yii::app()->request->getPost('newarray'); But there isn't a variable named newarray in the POST, instead their are one or more variable(s) named newarray[something]: newarray[role]=role | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Bug heat | 2 | ||||
Complete LimeSurvey version number (& build) | 140422 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | Google Chrome 34.0.1847.116 m | ||||
Database type & version | Server: MSSQL Server 2012 SP1 Enterprise Edition, Database: Compatability Level 2012, Collation SQL_Latin1_General_CP1_CI_AS | ||||
Server OS (if known) | Windows 2008 R2 Enterprise | ||||
Webserver software & version (if known) | IIS 7.5 | ||||
PHP Version | PHP 5.4.26.0 | ||||
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=14195 |
|
2.05+ Build 140502 released. |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2014-04-29 19:29 | Ibistide | New Issue | |
2014-04-29 19:29 | Ibistide | File Added: cantimportthesefields2.csv | |
2014-05-02 00:43 | c_schmitz | Assigned To | => c_schmitz |
2014-05-02 00:43 | c_schmitz | Status | new => assigned |
2014-05-02 13:11 | c_schmitz | Status | assigned => resolved |
2014-05-02 13:11 | c_schmitz | Fixed in Version | => 2.05+ |
2014-05-02 13:11 | c_schmitz | Resolution | open => fixed |
2014-05-02 13:12 | c_schmitz | Changeset attached | => LimeSurvey master 4e1d7015 |
2014-05-02 13:12 | c_schmitz | Note Added: 29935 | |
2014-05-02 15:10 | c_schmitz | Note Added: 29948 | |
2014-05-02 15:10 | c_schmitz | Status | resolved => closed |