View Issue Details

This bug affects 1 person(s).
 2
IDProjectCategoryView StatusLast Update
13251Bug reportsImport/Exportpublic2018-06-27 15:29
Reporterfvanderstarre Assigned Toc_schmitz  
PrioritynoneSeveritypartial_block 
Status closedResolutionfixed 
Product Version3.1.x 
Summary13251: DB error when importing multilingual group or question (mssql)
Description

Setting up a bilingual survey, I try to import a bilingual question with corresponding languages. This results in error message:
"SQLSTATE[HY000]: General error: 20018 Cannot insert explicit value for identity column in table 'questions' when IDENTITY_INSERT is set to OFF. [20018] (severity 16)" when importing a question lsq file
and
"SQLSTATE[HY000]: General error: 20018 Explicit value must be specified for identity column in table 'questions' either when IDENTITY_INSERT is set to ON or when a replication user is inserting into a NOT FOR REPLICATION identity column. [20018] (severity 16) [(null)]"
when importing a group lsg file. In the latter case, questions are partly imported but answer options are missing.

Steps To Reproduce

See above.

Additional Information

Already happens in 2.6.4 lts build 170202, and 3.0.3 also (with mssql).
I think the problem is that in mssql, qid is defined as "identity" column, so when you try to insert another row in the questions table with the same qid but another language, you get this error (identity column containing unique values).

TagsNo tags attached.
Bug heat2
Complete LimeSurvey version number (& build)3.1.0+180124, 2.6.4-lts170202, 3.0.3+180112
I will donate to the project if issue is resolvedNo
BrowserAny
Database type & versionMS-SQL 2008 R2
Server OS (if known)Linux RHEL 7
Webserver software & version (if known)Apache 2.4.6
PHP Version5.6.33

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2018-06-26 19:21

administrator   ~48310

Please attach the .lsg file you are trying to import. Thank you!

c_schmitz

c_schmitz

2018-06-26 19:30

administrator   ~48311

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

c_schmitz

c_schmitz

2018-06-26 19:30

administrator   ~48312

Nevermind - found it.

c_schmitz

c_schmitz

2018-06-27 15:29

administrator   ~48326

Version 3.12.3+180627 released

Related Changesets

LimeSurvey: master 3f97df3f

2018-06-26 19:30:31

c_schmitz

Details Diff
Fixed issue 13251: DB error when importing multilingual group or question using MSSQL DB Affected Issues
13251
mod - application/helpers/admin/import_helper.php Diff File

Issue History

Date Modified Username Field Change
2018-01-26 12:11 fvanderstarre New Issue
2018-06-26 13:52 LouisGac Assigned To => c_schmitz
2018-06-26 13:52 LouisGac Status new => assigned
2018-06-26 19:21 c_schmitz Status assigned => feedback
2018-06-26 19:21 c_schmitz Note Added: 48310
2018-06-26 19:30 c_schmitz Changeset attached => LimeSurvey master 3f97df3f
2018-06-26 19:30 c_schmitz Note Added: 48311
2018-06-26 19:30 c_schmitz Resolution open => fixed
2018-06-26 19:30 c_schmitz Status feedback => resolved
2018-06-26 19:30 c_schmitz Note Added: 48312
2018-06-27 15:29 c_schmitz Note Added: 48326
2018-06-27 15:29 c_schmitz Status resolved => closed