View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|17085||Bug reports||Survey editing||public||2021-02-11 16:46||2021-03-08 19:38|
|Fixed in Version||4.4.12|
|Summary||17085: unable to copy a survey from another|
|Description||when I try to copy a survey to a new one, I obtain the following error: |
CDbCommand failed to execute the SQL statement: SQLSTATE: Unique violation: 7 ERROR: duplicate key value violates unique constraint "lime_questions_pkey1"
DETAIL: Key (qid)=(1) already exists.
and subsequent error 500 from url index.php/surveyAdministration/copy
lime_questions_pkey1 is the primary key index, on column qid.
At the end, the survey exists (the insert into lime_surveys works) but it's obviously empty.
I suppose it doesn't change qid value to a new one, trying to reinsert it with the same.
|Steps To Reproduce||create new survey -> copy.|
|Tags||No tags attached.|
|Complete LimeSurvey version number (& build)||4.4.6|
|I will donate to the project if issue is resolved||No|
|Database type & version||PostgreSQL 11.9|
|Server OS (if known)||BSD 12.2|
|Webserver software & version (if known)|
|update: I had to manually alter lime_groups_gid_seq1 and lime_questions_qid_seq1 sequences in DB in order to make it work.|
I am unable to reproduce this. How would altering the sequence resolve this issue? If so, how exactly did you alter the sequence/index?
Does this happen with every survey or just this one? If only just this one can you please provide the survey as .lss file? thank you.
|the problem is PGSQL related: despite the presence of records in lime_questions, the value of sequence was still 1.|
I tested on PGSQL and had no problems.
Was this instance updated from LS3 or did you start using it with LS4 only?
|Upgraded from 3.25|
|Did you maybe in the course of this upgrade backup the database and restored it under a different name and then used the copy?|
|hi, no, it was the same... I solved by manually editing sequences.|
|I am able to reproduce this.|
|Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=31243|
|thanks a lot!|
|2021-02-11 16:46||zufolo441||New Issue|
|2021-02-11 17:17||zufolo441||Note Added: 62181|
|2021-02-11 19:21||ollehar||Severity||minor => partial_block|
|2021-02-11 21:11||cdorin||Priority||none => high|
|2021-02-11 21:11||cdorin||Status||new => confirmed|
|2021-02-11 21:11||cdorin||Sync to Zoho Project||=> |Yes||
|2021-02-15 12:04||c_schmitz||Sync to Zoho Project||Yes =>|
|2021-02-15 12:04||c_schmitz||Sync to Zoho Project||=> |Yes||
|2021-02-15 12:09||c_schmitz||Sync to Zoho Project||Yes => |Yes||
|2021-02-15 15:17||c_schmitz||Assigned To||=> c_schmitz|
|2021-02-15 15:17||c_schmitz||Status||confirmed => feedback|
|2021-02-15 15:17||c_schmitz||Note Added: 62254|
|2021-02-15 15:56||zufolo441||Note Added: 62256|
|2021-02-15 15:56||zufolo441||Status||feedback => assigned|
|2021-02-16 09:56||c_schmitz||Note Added: 62273|
|2021-02-16 09:56||c_schmitz||Status||assigned => feedback|
|2021-02-16 10:45||zufolo441||Note Added: 62276|
|2021-02-16 10:45||zufolo441||Status||feedback => assigned|
|2021-03-01 12:05||c_schmitz||Status||assigned => feedback|
|2021-03-01 12:05||c_schmitz||Note Added: 62570|
|2021-03-01 16:54||zufolo441||Note Added: 62585|
|2021-03-01 16:54||zufolo441||Status||feedback => assigned|
|2021-03-01 17:30||c_schmitz||Note Added: 62589|
|2021-03-01 18:13||c_schmitz||Status||assigned => resolved|
|2021-03-01 18:13||c_schmitz||Resolution||open => fixed|
|2021-03-01 18:13||c_schmitz||Changeset attached||=> LimeSurvey master 49cb539c|
|2021-03-01 18:13||c_schmitz||Note Added: 62591|
|2021-03-02 08:40||zufolo441||Note Added: 62597|
|2021-03-08 19:31||c_schmitz||Fixed in Version||=> 4.4.12|
|2021-03-08 19:38||c_schmitz||Status||resolved => closed|