View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
08715Bug reportsImport/Exportpublic2014-02-16 18:32
Reporterriqcles Assigned ToDenisChenu  
PrioritylowSeverityminor 
Status closedResolutionfixed 
Product Version2.05+ 
Fixed in Version2.05+ 
Summary08715: CDbCommand error when importing broken VV file
Description

Hello,
This bug is related to this one which is corrected :
Fixed issue # 8638

I put a video of all the steps to reproduce the bug.
When exporting an anonymous questionnaire responses and answers that is not complete , then the response date ( timestamp) take NULL.

When importing these responses, LimeSurvey plant because it does not replace the NULL value with 0.
This is due to PostgreSQL , MySQL replaces good 0.

error messages are not specific enough.

I added the files to reproduce these errors:
limesurvey_survey_88379.csv
vvexport_88379.csv

A third file is present:
vvexport_numeric_and_spaces.csv

I do not have the questionnaire available immediately. But the worry is that when a question is numeric type and the response contains a space instead of a digit ( response not captured by the respondent) , import plant also .

Here is the error message:

CDbCommand failed to execute the SQL statement : SQLSTATE [ 22P02 ] : Invalid text representation : 7 ERROR: invalid input syntax for type numeric : " "
LINE 1 : ... 321 " ) VALUES ( 10101 , '1980 -01-01 0:00:00 ',' en ','' ,'', '' ...

It is in this column :
Your department administrative assignment :

In line 4 , after fr, there is nothing.

Mysql bug for me, but a friend to a higher version and the value is replaced by 0

For information, here is the info on the vv file (which I can not provide in its entirety) :
( 12314 responses to the questionnaire ( 11137 complete responses , partial responses in 1177 )

I did the test with complete answers , following the above-mentioned problem .

Steps To Reproduce

see video

TagsNo tags attached.
Attached Files
Import_V185_V205.zip (2,765 bytes)
Bug heat8
Complete LimeSurvey version number (& build)1.85+7689 / 2.05+140204
I will donate to the project if issue is resolvedNo
BrowserIE/Firefox
Database type & versionmysqlnd 5.0.8-dev - 20102224 and Postgresql 9.1
Server OS (if known)CentOS/EasyPHP
Webserver software & version (if known)Apache 2.2
PHP Version5.3

Users monitoring this issue

riqcles

Activities

DenisChenu

DenisChenu

2014-02-13 21:57

developer   ~28721

Last edited: 2014-02-13 22:00

You mean : export VV from 1.85 to 2.0.5 ?

Because no problem with a 2.00 vv version.
In some version, we fix NULL value using {question_not_shown} .

You can update your file and replace NULL by {question_not_shown}.

Think it's a won't fix bug here. You can update your vv file : http://manual.limesurvey.org/Exporting_results#Reserved_names

riqcles

riqcles

2014-02-13 23:22

reporter   ~28722

Ok I look at this, but the error relates to the PostgreSQL import VV (Mysql no problem).
I have about 500 active survey, with responses from 1 to 20000, we'll see what I can do with it :)
I would try NULL with PostgreSQL V2.05

riqcles

riqcles

2014-02-13 23:29

reporter   ~28723

View here :
http://e-nautia.com/riqcles/disk/LimeSurvey_bugs/Remonte_bugs_VV_Import_KO.zip

Download the file
unzip the two files in the same directory
open the html file in a browser (double click)

riqcles

riqcles

2014-02-14 19:12

reporter   ~28746

The parameter does not exist in 1.85.
I'll add it manually for each record that is needed.
Like you said Denis, to avoid burdening the import of VV process, we will close the bug.
Unless other than me scream! lol

DenisChenu

DenisChenu

2014-02-15 13:48

developer   ~28748

Think we must have a real Import control and not have a CBD error here.

This not fix import form 1.85 to 2.05, but if some column are bad : then no DB error.

Denis

DenisChenu

DenisChenu

2014-02-15 16:31

developer   ~28749

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

c_schmitz

c_schmitz

2014-02-16 18:32

administrator   ~28776

2.05+ Build 140216 released

Related Changesets

LimeSurvey: master 5c120dd3

2014-02-15 15:30:49

DenisChenu

Details Diff
Fixed issue 08715: CDbCommand error when importing broken VV file
Dev: Use transaction, don't fix VV value
Dev: Devloppement todo : validate $sResponse before $oSurvey->$sFieldName = $sResponse;
Dev: it's a really great way, but need dynamic rules to construct
Affected Issues
08715
mod - application/helpers/admin/import_helper.php Diff File

Issue History

Date Modified Username Field Change
2014-02-13 20:05 riqcles New Issue
2014-02-13 20:05 riqcles File Added: Import_V185_V205.zip
2014-02-13 20:31 riqcles Issue Monitored: riqcles
2014-02-13 21:57 DenisChenu Note Added: 28721
2014-02-13 21:58 DenisChenu Priority high => low
2014-02-13 21:58 DenisChenu Severity block => minor
2014-02-13 21:58 DenisChenu Summary Import VV don't work with PostGresQL => Import VV form 1.85 don't work with PostGresQL
2014-02-13 22:00 DenisChenu Note Edited: 28721
2014-02-13 23:22 riqcles Note Added: 28722
2014-02-13 23:29 riqcles Note Added: 28723
2014-02-14 19:12 riqcles Note Added: 28746
2014-02-14 19:49 c_schmitz Status new => closed
2014-02-14 19:49 c_schmitz Assigned To => c_schmitz
2014-02-14 19:49 c_schmitz Resolution open => unable to reproduce
2014-02-15 13:48 DenisChenu Assigned To c_schmitz => DenisChenu
2014-02-15 13:48 DenisChenu Note Added: 28748
2014-02-15 13:48 DenisChenu Status closed => feedback
2014-02-15 13:48 DenisChenu Resolution unable to reproduce => reopened
2014-02-15 13:48 DenisChenu Status feedback => assigned
2014-02-15 13:49 DenisChenu Summary Import VV form 1.85 don't work with PostGresQL => CBD error with bad V file
2014-02-15 16:31 DenisChenu Changeset attached => LimeSurvey master 5c120dd3
2014-02-15 16:31 DenisChenu Note Added: 28749
2014-02-15 16:31 DenisChenu Summary CBD error with bad V file => CDbCommand error when importing broken VV file
2014-02-15 16:31 DenisChenu Status assigned => resolved
2014-02-15 16:31 DenisChenu Fixed in Version => 2.05+
2014-02-15 16:31 DenisChenu Resolution reopened => fixed
2014-02-16 18:32 c_schmitz Note Added: 28776
2014-02-16 18:32 c_schmitz Status resolved => closed
2021-08-05 05:02 guest Bug heat 6 => 8