View Issue Details

This bug affects 1 person(s).
 12
IDProjectCategoryView StatusLast Update
16579Bug reportsSurvey participants (Tokens)public2020-12-30 19:27
ReporterTonyMonast Assigned ToJHoeck  
PrioritynoneSeverityminor 
Status closedResolutionfixed 
Product Version4.3.8 
Summary16579: Problem with the error message when a token is already used (inherit)
Description

When a token is already used and the error message appear, the admin info and email show the text "Inherit" instead of the inherit values. I tried with the Vanilla theme and I have the same problem.

Steps To Reproduce
  1. Create a new survey with one question
  2. Generate participants
  3. Use the first token to access the survey and complete the survey
  4. Try to reuse the same token to access the survey
  5. The error message will appear (see attachment)
TagsNo tags attached.
Attached Files
Screenshot_2020-08-11 ERROR.png (22,283 bytes)   
Screenshot_2020-08-11 ERROR.png (22,283 bytes)   
Bug heat12
Complete LimeSurvey version number (& build)Version 4.3.8+200803
I will donate to the project if issue is resolvedNo
BrowserFirefox
Database type & version5.7.31
Server OS (if known)Linux
Webserver software & version (if known)Apache
PHP Version 7.4.8

Users monitoring this issue

There are no users monitoring this issue.

Activities

TonyMonast

TonyMonast

2020-08-11 16:44

reporter   ~59408

Same problem when the survey is in english.

error-english.png (21,886 bytes)   
error-english.png (21,886 bytes)   
cdorin

cdorin

2020-10-19 11:58

reporter   ~60263

Hey there,

I am not sure if I understand where the bug is - do you want to use the same token for multiple entries?

DenisChenu

DenisChenu

2020-10-19 13:43

developer   ~60264

@cdorin : admin name «inherit«, admin email : «inherit»

Must be inherited value, not the 'inherit' string

;)

TonyMonast

TonyMonast

2020-10-19 14:51

reporter   ~60266

As Denis said. We should not see the text "inherit", but rather its corresponding value.

cdorin

cdorin

2020-10-19 16:36

reporter   ~60269

Ah, thanks! got it now :) . Confirmed and reported :)

JHoeck

JHoeck

2020-10-30 11:23

reporter   ~60454

This is not a bug. The value 'inherit' is set for the adminemail in db.

1231313131.JPG (45,252 bytes)   
1231313131.JPG (45,252 bytes)   
ollehar

ollehar

2020-10-30 11:27

administrator   ~60455

This should use the value from the belonging survey group, or what?

DenisChenu

DenisChenu

2020-10-30 11:39

developer   ~60457

@JHoeck : maybe in DB , this is not the desired behaviour :

It must be same email that the email used when sending email
Or this one shown on Survey settings edit

@ollehar : i finally founs how to set this value by group …
admin/surveysgroups/sa/surveysettings/id/1
(second pic) : final by global settings

DenisChenu

DenisChenu

2020-10-30 11:40

developer   ~60458

PS : maybe inherit value can be saved as NULL value in DB ?

If we have an administrator with name inherit

JHoeck

JHoeck

2020-10-30 11:57

reporter   ~60460

would be a good idea to set it to null.

ollehar

ollehar

2020-10-30 12:05

administrator   ~60461

would be a good idea to set it to null.

Don't do this now, tho. You'd have to change all "inherit" in all database tables to make it consistent.

DenisChenu

DenisChenu

2020-10-30 14:20

developer   ~60463

Don't do this now, tho. You'd have to change all "inherit" in all database tables to make it consistent.

Maybe , but it's a pity not to have designed it like that from the start

You don't think we can do a DB upgrade an a fix when import (comparing with DB version of the xml) ?

ollehar

ollehar

2020-10-30 14:21

administrator   ~60464

Maybe , but it's a pity not to have designed it like that from the start

Yeah. A better value than null might be "<inherit>" or "__Inherit" or similar.

You don't think we can do a DB upgrade an a fix when import (comparing with DB version of the xml) ?

Maybe, but not now, bigger fish to fry. :)

DenisChenu

DenisChenu

2020-10-30 14:24

developer   ~60465

Yeah. A better value than null might be "<inherit>" or "__Inherit" or similar.

No, i really think NULL is better. Null mean : not set, if not set get it elsewhere.

ollehar

ollehar

2020-10-30 14:25

administrator   ~60466

Null does not communicate intent.

DenisChenu

DenisChenu

2020-10-30 14:57

developer   ~60468

Anything else can broke with specific need …

null == not set seems clear enough for me :)

ollehar

ollehar

2020-10-30 15:10

administrator   ~60469

null == not set seems clear enough for me :)

I'm not thinking of you, I'm thinking of someone that sees the database for the first time. Low barrier to enter.

DenisChenu

DenisChenu

2020-10-30 16:39

developer   ~60473

see comment of @JHoeck : i really think she's right :) At fist look : admin name is inherit ("<inherit>" or "__Inherit" or similar.).

With NULL : «There are something strange here : get look at code»

:)

A good discussion for next dev meeting ;)

DenisChenu

DenisChenu

2020-11-02 14:28

developer   ~60493

Else : $oSurvey->oOptions->adminemail and $oSurvey->oOptions->admin must be used somewhere in place of $oSurvey->adminemail and $oSurvey->admin

ollehar

ollehar

2020-11-02 14:29

administrator   ~60494

Problem include SurveyGroupsettings somewhere too.

DenisChenu

DenisChenu

2020-11-02 14:34

developer   ~60495

I think $oSurvey->oOptions do this.
https://github.com/LimeSurvey/LimeSurvey/blob/6c69a7b9318515793305a5eac1b7285f909b5d98/application/models/Survey.php#L2044

https://github.com/LimeSurvey/LimeSurvey/blob/6c69a7b9318515793305a5eac1b7285f909b5d98/application/models/SurveysGroupsettings.php#L301

gabrieljenik

gabrieljenik

2020-11-02 15:45

manager   ~60496

I think $oSurvey->oOptions do this.

Yes, it does.
https://github.com/LimeSurvey/LimeSurvey/blob/6c69a7b9318515793305a5eac1b7285f909b5d98/application/models/Survey.php#L564

What I am not sure now is about inheritance from the global admin settings.
Is that included? IS it expected to be included?

I'm not thinking of you, I'm thinking of someone that sees the database for the first time. Low barrier to enter.

I agree. It will be also less error prone.
At last, we can always, in the code, adopt the inheritnce behaviour if NULL is found.

DenisChenu

DenisChenu

2020-11-02 16:10

developer   ~60497

Is that included? IS it expected to be included?

Looking this morning : Survey global settings have gsid = 0

Then: https://github.com/LimeSurvey/LimeSurvey/blob/6c69a7b9318515793305a5eac1b7285f909b5d98/application/models/SurveysGroupsettings.php#L340

JHoeck

JHoeck

2020-11-02 18:15

reporter   ~60499

Last edited: 2020-11-02 18:18

Fixed in branch: bug/issue-16579-problem-with-erro-message-when-token-already-used-inherit

(Replaced $aSurveyInfo['admin'] and $aSurveyInfo['adminemail'] with the survey options values (admin and adminemail). So this is a quick fix for those issues, but in the future we have to think about the inheritence (inherit value)).

cdorin

cdorin

2020-12-30 19:27

reporter   ~61335

fixed in 4.4.0 rc1

Issue History

Date Modified Username Field Change
2020-08-11 16:34 TonyMonast New Issue
2020-08-11 16:34 TonyMonast File Added: Screenshot_2020-08-11 ERROR.png
2020-08-11 16:44 TonyMonast Note Added: 59408
2020-08-11 16:44 TonyMonast File Added: error-english.png
2020-10-19 11:58 cdorin Note Added: 60263
2020-10-19 11:58 cdorin Status new => feedback
2020-10-19 13:43 DenisChenu Note Added: 60264
2020-10-19 14:51 TonyMonast Note Added: 60266
2020-10-19 14:51 TonyMonast Status feedback => new
2020-10-19 16:36 cdorin Note Added: 60269
2020-10-19 16:37 cdorin Status new => confirmed
2020-10-30 11:23 JHoeck Note Added: 60454
2020-10-30 11:23 JHoeck File Added: 1231313131.JPG
2020-10-30 11:23 JHoeck Assigned To => JHoeck
2020-10-30 11:23 JHoeck Status confirmed => assigned
2020-10-30 11:27 ollehar Note Added: 60455
2020-10-30 11:39 DenisChenu Note Added: 60457
2020-10-30 11:39 DenisChenu File Added: Capture d’écran du 2020-10-30 11-37-40.png
2020-10-30 11:39 DenisChenu File Added: Capture d’écran du 2020-10-30 11-39-03.png
2020-10-30 11:40 DenisChenu Note Added: 60458
2020-10-30 11:57 JHoeck Note Added: 60460
2020-10-30 12:05 ollehar Note Added: 60461
2020-10-30 14:20 DenisChenu Note Added: 60463
2020-10-30 14:21 ollehar Note Added: 60464
2020-10-30 14:24 DenisChenu Note Added: 60465
2020-10-30 14:25 ollehar Note Added: 60466
2020-10-30 14:57 DenisChenu Note Added: 60468
2020-10-30 15:10 ollehar Note Added: 60469
2020-10-30 16:39 DenisChenu Note Added: 60473
2020-11-02 14:28 DenisChenu Note Added: 60493
2020-11-02 14:29 ollehar Note Added: 60494
2020-11-02 14:34 DenisChenu Note Added: 60495
2020-11-02 15:45 gabrieljenik Note Added: 60496
2020-11-02 16:10 DenisChenu Note Added: 60497
2020-11-02 18:15 JHoeck Note Added: 60499
2020-11-02 18:18 JHoeck Note Edited: 60499
2020-11-02 18:18 JHoeck Status assigned => resolved
2020-11-02 18:18 JHoeck Resolution open => fixed
2020-12-30 19:27 cdorin Note Added: 61335
2020-12-30 19:27 cdorin Status resolved => closed