View Issue Details

This issue affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
07940Bug reportspublic2026-11-19 22:22
Reportermabellaneda Assigned To 
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Summary07940: Token code can be repeated in a survey.
Description

A token can be repeated in a survey by editing a token's entry in the survey's token's table or importing token's entries from a CSV file.

Steps To Reproduce

By modifying a token entry:

  1. Create the token's table of a survey.
  2. Add a token entry with a chosen value in the field token, for example "xxx".
  3. Add a token entry with different value in the field token, for example "yyy".
  4. Edit second token entry and change the field's token value from "yyy" to "xxx".
  5. You'll find then two entries in the same token's table with the same token value.

By importing from a CSV file:

  1. Create the token's table of a survey.
  2. Add a token entry with a chosen value in the field token, for example "xxx".
  3. Generate a CSV file with the fields: firstname, lastname, emailstatus, token, laguage code, tid; and only fill one row with the fields "token" and "language code" with the values "xxx" and "en" respectively (I'm not sure if the "language code" field is mandatory).
  4. Go to the mentioned token's table and "Import tokens form CSV file" and import the CSV generated file.
  5. You'll find then two entries in the same token's table with the same token value.
TagsNo tags attached.
Attached Files
LimeSurvey_tokensBug.JPG (61,511 bytes)   
LimeSurvey_tokensBug.JPG (61,511 bytes)   
Bug heat6
Complete LimeSurvey version number (& build)
I will donate to the project if issue is resolved
Browser
Database type & version
Server OS (if known)
Webserver software & version (if known)
PHP Version
Git branch / Pull Request URL

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2013-06-24 18:08

developer   ~25628

Last edited: 2013-06-24 18:08

Token is tested only when use included LS generation.
Think it's a feauture request.

sammousa

sammousa

2013-06-26 12:57

reporter   ~25652

For 2.05 we might want to add a unique constraint to the table definition?

DenisChenu

DenisChenu

2013-06-26 13:14

developer   ~25654

sammousa : Can not directly: Unique if not emty ;)

DenisChenu

DenisChenu

2013-06-26 19:56

developer   ~25671

And it's an old bug .... maybe some user use this bug like a feature (don't know how but .... never say never ...)

Think it's best to have a tools to find and correct with 2 option : remove all double, or remove second double, or put an alert link.

Maybe in Plugin ;)

c_schmitz

c_schmitz

2026-11-19 22:22

administrator   ~87697

In LimeSurvey 7 access codes must be unique within a survey: the participant model validates uniqueness when adding or editing a participant, and the CSV import skips and reports rows whose access code already exists. Closing as fixed.

Issue History

Date Modified Username Field Change
2013-06-20 13:04 mabellaneda New Issue
2013-06-20 13:04 mabellaneda File Added: LimeSurvey_tokensBug.JPG
2013-06-24 18:08 DenisChenu Note Added: 25628
2013-06-24 18:08 DenisChenu Note Edited: 25628
2013-06-26 12:57 sammousa Note Added: 25652
2013-06-26 13:14 DenisChenu Note Added: 25654
2013-06-26 19:56 DenisChenu Note Added: 25671
2026-11-19 22:22 c_schmitz Note Added: 87697
2026-11-19 22:22 c_schmitz Bug heat 4 => 6
2026-11-19 22:22 c_schmitz Status new => closed
2026-11-19 22:22 c_schmitz Resolution open => fixed
2026-11-20 10:33 c_schmitz Category Tokens => (No Category)