View Issue Details

This issue affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
08870Bug reportsImport/Exportpublic2014-03-19 17:00
Reporterjoe_p Assigned Toc_schmitz  
PrioritynormalSeverityminor 
Status closedResolutionunable to reproduce 
Product Version2.05+ 
Summary08870: Unable to import a survey from version 1.92
Description

I have done a clean test install of 2.05, and have tried importing surveys from our current production instance of LimeSurvey (1.92 Build 120919). All I get when I try to import the .lss file is this error:

Error: Failed to insert data [1]

In config.php, I currently have debug set to 2 and debugsql set to 1, so I'm surprised I'm not seeing an error that's a bit more descriptive.

I have also tried running the upgrade process on a copy of the existing database, but that also did not work.

Steps To Reproduce
  1. Click to create/import/copy a survey
  2. Select the attached .lss file (exported from a currently running survey in version 1.92)
  3. Click import survey and receive error message.
Additional Information

Database version for production site running 1.92 is 155.6.

TagsNo tags attached.
Attached Files
Bug heat4
Complete LimeSurvey version number (& build)140317
I will donate to the project if issue is resolvedNo
BrowserChrome
Database type & version177
Server OS (if known)Windows 7
Webserver software & version (if known)IIS 7.5
PHP Version5.3.28
Git branch / Pull Request URL

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2014-03-17 23:03

administrator   ~29310

Last edited: 2014-03-17 23:04

What server OS and database type is the 1.92 running on ?
Looks like a misconfigured Linux->MSSQL combination to me.
The .lss file contains alot of invalid data, the error message says that the survey record cannot be inserted - mainly because there are space characters in certain fields which are supposed to be empty.

The underlying problem is that your FreeTDS returns spaces on empty fields because of a misconfiguration. You can fix this problem by forcing the FreeTDS protocol version to at least 7.0. See http://www.php.net/manual/de/ref.pdo-dblib.connection.php#112146

joe_p

joe_p

2014-03-17 23:11

reporter   ~29313

Our production server and database info:
-Server is Windows Server 2008, running IIS 7
-Database is SQL Server (10.0)

I'm using the same version of SQL Server for both instances.

I can take a look tomorrow at the FreeTDS link.

c_schmitz

c_schmitz

2014-03-17 23:17

administrator   ~29314

Maybe the webserver was previously on Linux? Is the .lss file a fresh export or was it done a long time ago?

Example: If you check the lss file with a text editor and look at the field 'savetimings' you can see there is a space char in the CDATA field (which should not be there)

Anyway, it is a problem with the .lss file, not a bug in LimeSurvey.

joe_p

joe_p

2014-03-19 15:53

reporter   ~29414

I don't need the issue reopened, but I wanted to add a note about some of your feedback...

Our webserver has always been Windows Server. I wasn't able to find anything about FreeTDS in my production instance of LimeSurvey (version 1.92) - is that only on Linux?

The .lss file was a fresh export. I was finally able to get surveys exported in version 1.92 Build 120919 imported into version 2.05 by doing two things:

  1. Find and replace any occurrences where bracket following CDATA has a space:
    Find: CDATA[ ]
    Replace: CDATA[]

  2. Remove lastpage entries from 1.92 export under <surveys> and <surveys_languagesettings>.
    <fieldname>lastpage</fieldname>
    <lastpage><![CDATA[0]]></lastpage>

c_schmitz

c_schmitz

2014-03-19 16:47

administrator   ~29416

Yeah, it is really weird. It might also be a bug in the old MSSQL driver you were using.

It is hard to tell.

After import on the new installation do an export of that survey from the new installation again and check if the entries are still fine using a text editor.

joe_p

joe_p

2014-03-19 16:55

reporter   ~29417

After re-exporting the survey which I had imported from the 1.92 export, I opened it in a text editor and didn't find any occurrences of the extra space in the bracket. So the problem seems limited to my 1.92 setup.

c_schmitz

c_schmitz

2014-03-19 17:00

administrator   ~29418

Ok, thanks. I am closing this issue then.

Issue History

Date Modified Username Field Change
2014-03-17 22:30 joe_p New Issue
2014-03-17 22:30 joe_p File Added: limesurvey_survey_69969 (2).lss
2014-03-17 23:03 c_schmitz Note Added: 29310
2014-03-17 23:03 c_schmitz Assigned To => c_schmitz
2014-03-17 23:03 c_schmitz Status new => feedback
2014-03-17 23:04 c_schmitz Note Edited: 29310
2014-03-17 23:11 joe_p Note Added: 29313
2014-03-17 23:11 joe_p Status feedback => assigned
2014-03-17 23:17 c_schmitz Note Added: 29314
2014-03-17 23:18 c_schmitz Status assigned => closed
2014-03-17 23:18 c_schmitz Resolution open => unable to reproduce
2014-03-19 15:53 joe_p Note Added: 29414
2014-03-19 15:53 joe_p Status closed => feedback
2014-03-19 15:53 joe_p Resolution unable to reproduce => reopened
2014-03-19 16:47 c_schmitz Note Added: 29416
2014-03-19 16:55 joe_p Note Added: 29417
2014-03-19 16:55 joe_p Status feedback => assigned
2014-03-19 17:00 c_schmitz Note Added: 29418
2014-03-19 17:00 c_schmitz Status assigned => closed
2014-03-19 17:00 c_schmitz Resolution reopened => unable to reproduce