Relationship Graph

Relationship Graph
related to related to child of child of duplicate of duplicate of

View Issue Details

This bug affects 1 person(s).
 12
IDProjectCategoryView StatusLast Update
18436Bug reportsSurvey participants (Tokens)public2023-10-30 10:54
Reportercolnect Assigned ToDenisChenu  
PrioritynormalSeverityblock 
Status closedResolutionfixed 
Product Version5.4.x 
Fixed in Version5.4.x 
Summary18436: Remote control API : Inviting members with invalid language sends them an email but they're not marked as invited
Description

This happens in 5.4.8+221024 but didn't happen in 5.0.10+210723. Via the API, inviting all tokenized users to the survey marks only some as invited and others not, EVEN THOUGH an email is sent to them.
When trying to mass edit these users to change their statis as invited, the error "language: Language code is invalid in this survey" is given and the operation fails. However, manually editing each user is possible.
This blocks the use of the invitation feature as people kept getting the same emails repeatedly and reported them.

More details are in https://forums.limesurvey.org/forum/plugins/128560-survey-invitations-keeps-getting-resent

Steps To Reproduce

Steps to reproduce

Create some tokens for users in different languages, including a language that the specific survey doesn't have. Send invitations to all.

Expected result

All those who get an email are marked as invited

Actual result

The ones with an invalid language code are not marked as invited and so additional invitation emails will be sent to them on every launch

TagsNo tags attached.
Bug heat12
Complete LimeSurvey version number (& build)5.4.8+221024
I will donate to the project if issue is resolvedYes
Browser
Database type & versionMariaDB
Server OS (if known)
Webserver software & version (if known)
PHP Version8.0

Relationships

duplicate of 18034 closedDenisChenu Date from token with invalid language show error and date not saved 

Activities

gabrieljenik

gabrieljenik

2022-10-31 14:06

manager   ~72482

Via the API, inviting all tokenized users to the survey marks only some as invited and others not, EVEN THOUGH an email is sent to them.

The error happens only via API invitations?

colnect

colnect

2022-10-31 14:12

reporter   ~72484

As clarified, I can't do mass-edit either. I don't dare to click invite all from the admin because I don't want to spam hundreds of people again. They all got 4 of the same emails already

gabrieljenik

gabrieljenik

2022-10-31 14:19

manager   ~72485

Please, can I ask you to create a new ticket for the mass-edit part?
Thanks

DenisChenu

DenisChenu

2022-10-31 14:56

developer   ~72487

The error happens only via API invitations?

For admin GUI : https://bugs.limesurvey.org/view.php?id=18034

Fix are in https://github.com/LimeSurvey/LimeSurvey/pull/2352
since April the 14 …

colnect

colnect

2022-11-01 00:10

reporter   ~72498

DenisChenu - if fixe is marked as closed, doesn't it mean it's been merged and should have been on the latest version, which is the version I have?

gabrieljenik - I think it's all around the same token issue so I don't believe there's a need for various issues here but feel free to, I'm not familiar with the codebase.

colnect

colnect

2022-11-01 00:32

reporter   ~72499

Until it's possible to use a fixed version, could any of you indicate for me how to mark tokens as 'invited' in the database? Some sort of SQL would be great as I'm not sure if only one table is affects and I don't wanna dive so deeply into the code and end up messing the DB. Thanks

DenisChenu

DenisChenu

2022-11-01 02:20

developer   ~72501

DenisChenu - if fixe is marked as closed, doesn't it mean it's been merged and should have been on the latest version, which is the version I have?

reopen because system to create PR are updated

https://github.com/LimeSurvey/LimeSurvey/pull/2691

gabrieljenik

gabrieljenik

2022-11-10 14:15

manager   ~72699

PR 2691 tested OK towards this bug

colnect

colnect

2022-12-21 04:03

reporter   ~73217

I've upgraded to Version 5.4.15+221212 and the bug still exists. Reminders were repeatedly sent (using $limeAPI->remind_participants() ) to the same people over and over, yet they haven't been marked. Obviously this is causing a big wave of complaints and reduces our reputation as a non-spammer. Also $limeAPI->invite_participants() keeps showing the same people over and over again

DenisChenu

DenisChenu

2022-12-21 08:18

developer   ~73220

$limeAPI->remind_participants() don't seem related ?

$limeAPI->invite_participants() argl, related issue are for GUI, not API, i update the title.

colnect

colnect

2022-12-21 12:08

reporter   ~73230

From the creation of the issue it was about the API. There are still problems and they don't seem solved in the newest version.

gabrieljenik

gabrieljenik

2022-12-21 15:24

manager   ~73246

PR 2691 tested OK towards this bug

Yes, sorry. That was from the Admin GUI

DenisChenu

DenisChenu

2022-12-21 16:28

developer   ~73247

https://github.com/LimeSurvey/LimeSurvey/pull/2810

colnect

colnect

2023-01-14 12:13

reporter   ~73465

I've previously deployed the patch and things seemed better with it. I now upgraded to Version 5.5.2+230109 and it seems the patch isn't there either. So should I apply it again?

gabrieljenik

gabrieljenik

2023-01-16 13:51

manager   ~73471

Yes, please. The patch is not yet released.

gabrieljenik

gabrieljenik

2023-03-17 15:14

manager   ~74171

@DenisChenu Please find below some tests added for remote control invitation process.
Can be attached to this PR maybe :)
https://github.com/LimeSurvey/LimeSurvey/tree/bug/18436_API_sendmail_invalidlang_tests

tibor.pacalat

tibor.pacalat

2023-10-23 16:31

administrator   ~77878

Last edited: 2023-10-23 16:33

@DenisChenu This PR https://github.com/LimeSurvey/LimeSurvey/pull/2810 points to master, but it is outdated (see screenshot).

I have tested this on 5.x and it fixes the issue, but ... we should probably have one PR for 5.x and one for master (master has the same issue).

tibor.pacalat

tibor.pacalat

2023-10-23 16:32

administrator   ~77879

DenisChenu

DenisChenu

2023-10-24 16:41

developer   ~77923

@tibor.pacalat : can you try if current master didn't broke Survey with token attribute encrypted ?

I think there are an issue, but unsure my fix fix it.

DenisChenu

DenisChenu

2023-10-24 16:51

developer   ~77927

5.X : https://github.com/LimeSurvey/LimeSurvey/pull/2810
master : https://github.com/LimeSurvey/LimeSurvey/pull/3571

tibor.pacalat

tibor.pacalat

2023-10-24 16:51

administrator   ~77928

Last edited: 2023-10-24 16:53

@tibor.pacalat : can you try if current master didn't broke Survey with token attribute encrypted ?

I think there are an issue, but unsure my fix fix it.

@DenisChenu not sure what you want me to test in master, can you please give me more detailed instructions?

DenisChenu

DenisChenu

2023-10-24 17:30

developer   ~77936

Just check what happen with Encrypted attribute

I think it broke token table without the fix.

DenisChenu

DenisChenu

2023-10-24 17:32

developer   ~77937

In order

  1. Create survey with token
  2. Set all token attribute to Encrypted
  3. Add some participant with valid email
  4. Send email via Remote Control
  5. Look at Token table
DenisChenu

DenisChenu

2023-10-24 17:33

developer   ~77938

6.X / master : https://github.com/LimeSurvey/LimeSurvey/pull/3571
(new one)

gabrieljenik

gabrieljenik

2023-10-25 15:09

manager   ~77976

  1. Send email via Remote Control

Quick review... We are using save instead of encryptSave?
https://github.com/LimeSurvey/LimeSurvey/pull/3571/files#diff-14656bf94273e7a850e21510aa61b320b32930e5ac8fea093f53f5a968c0ab1eR80

DenisChenu

DenisChenu

2023-10-25 17:15

developer   ~77997

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

tibor.pacalat

tibor.pacalat

2023-10-25 17:16

administrator   ~77998

Tested and merged.

DenisChenu

DenisChenu

2023-10-25 17:18

developer   ~77999

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

DenisChenu

DenisChenu

2023-10-25 17:18

developer   ~78000

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

LimeBot

LimeBot

2023-10-30 10:54

administrator   ~78131

Fixed in Release 5.6.43+231030

Related Changesets

LimeSurvey: master 590c1ac7

2023-10-25 17:15:15

DenisChenu


Committer: GitHub Details Diff
Fixed issue 18436: RC API - Inviting members with invalid language sends them an email but they're not marked as invited (#3571) Affected Issues
18436
mod - application/helpers/admin/token_helper.php Diff File
mod - application/helpers/remotecontrol/remotecontrol_handle.php Diff File
mod - tests/TestBaseClass.php Diff File
add - tests/data/plugins/DummyMailer.php Diff File
mod - tests/unit/helpers/remotecontrol/InviteParticipantsTest.php Diff File

LimeSurvey: 5.x 5e78af0e

2023-10-25 17:15:52

DenisChenu


Committer: GitHub Details Diff
Fixed issue 18436: RC API - Inviting members with invalid language s… (#2810) Affected Issues
18436
mod - application/helpers/admin/token_helper.php Diff File
mod - application/helpers/remotecontrol/remotecontrol_handle.php Diff File
mod - tests/TestBaseClass.php Diff File
add - tests/data/plugins/DummyMailer.php Diff File
mod - tests/unit/helpers/remotecontrol/InviteParticipantsTest.php Diff File

LimeSurvey: 5.x 5e78af0e

2023-10-25 17:15:52

DenisChenu


Committer: GitHub Details Diff
Fixed issue 18436: RC API - Inviting members with invalid language s… (#2810) Affected Issues
18436
mod - application/helpers/admin/token_helper.php Diff File
mod - application/helpers/remotecontrol/remotecontrol_handle.php Diff File
mod - tests/TestBaseClass.php Diff File
add - tests/data/plugins/DummyMailer.php Diff File
mod - tests/unit/helpers/remotecontrol/InviteParticipantsTest.php Diff File

Issue History

Date Modified Username Field Change
2022-10-30 21:43 colnect New Issue
2022-10-31 09:05 DenisChenu Issue Monitored: DenisChenu
2022-10-31 09:05 DenisChenu Bug heat 0 => 2
2022-10-31 14:06 gabrieljenik Status new => acknowledged
2022-10-31 14:06 gabrieljenik Note Added: 72482
2022-10-31 14:06 gabrieljenik Bug heat 2 => 4
2022-10-31 14:12 colnect Note Added: 72484
2022-10-31 14:12 colnect Bug heat 4 => 6
2022-10-31 14:19 gabrieljenik Note Added: 72485
2022-10-31 14:55 DenisChenu Relationship added duplicate of 18034
2022-10-31 14:56 DenisChenu Note Added: 72487
2022-10-31 14:56 DenisChenu Bug heat 6 => 8
2022-11-01 00:10 colnect Note Added: 72498
2022-11-01 00:32 colnect Note Added: 72499
2022-11-01 02:20 DenisChenu Note Added: 72501
2022-11-01 02:20 DenisChenu Assigned To => DenisChenu
2022-11-01 02:20 DenisChenu Status acknowledged => assigned
2022-11-01 09:24 ollehar Priority none => normal
2022-11-03 16:43 DenisChenu Assigned To DenisChenu => ollehar
2022-11-03 16:43 DenisChenu Status assigned => ready for testing
2022-11-03 16:43 DenisChenu Category Central participant database => Survey participants (Tokens)
2022-11-10 14:15 gabrieljenik Note Added: 72699
2022-11-10 15:48 DenisChenu Status ready for testing => ready for merge
2022-11-22 14:18 DenisChenu Status ready for merge => resolved
2022-11-22 14:18 DenisChenu Resolution open => duplicate
2022-11-22 14:18 DenisChenu Fixed in Version => 5.4.x
2022-12-15 08:44 DenisChenu Assigned To ollehar => DenisChenu
2022-12-15 08:44 DenisChenu Status resolved => closed
2022-12-21 04:03 colnect Status closed => feedback
2022-12-21 04:03 colnect Resolution duplicate => reopened
2022-12-21 04:03 colnect Note Added: 73217
2022-12-21 08:18 DenisChenu Note Added: 73220
2022-12-21 08:18 DenisChenu Summary Inviting members with invalid language sends them an email but they're not marked as invited => Remote control API : Inviting members with invalid language sends them an email but they're not marked as invited
2022-12-21 12:08 colnect Note Added: 73230
2022-12-21 12:08 colnect Status feedback => assigned
2022-12-21 15:24 gabrieljenik Note Added: 73246
2022-12-21 16:28 DenisChenu Note Added: 73247
2022-12-21 16:28 DenisChenu Assigned To DenisChenu =>
2022-12-21 16:28 DenisChenu Status assigned => ready for code review
2023-01-14 12:13 colnect Note Added: 73465
2023-01-16 13:51 gabrieljenik Note Added: 73471
2023-03-17 15:14 gabrieljenik Note Added: 74171
2023-08-07 17:06 gabrieljenik Assigned To => DenisChenu
2023-08-07 17:06 gabrieljenik Status ready for code review => assigned
2023-10-20 00:27 gabrieljenik Assigned To DenisChenu => tibor.pacalat
2023-10-20 00:27 gabrieljenik Status assigned => ready for testing
2023-10-23 16:31 tibor.pacalat Note Added: 77878
2023-10-23 16:31 tibor.pacalat Bug heat 8 => 10
2023-10-23 16:32 tibor.pacalat Note Added: 77879
2023-10-23 16:32 tibor.pacalat File Added: Screenshot 2023-10-23 at 16.32.14.png
2023-10-23 16:33 tibor.pacalat Assigned To tibor.pacalat => DenisChenu
2023-10-23 16:33 tibor.pacalat Note Edited: 77878
2023-10-23 16:39 DenisChenu Status ready for testing => assigned
2023-10-24 16:41 DenisChenu Note Added: 77923
2023-10-24 16:51 DenisChenu Note Added: 77927
2023-10-24 16:51 tibor.pacalat Note Added: 77928
2023-10-24 16:53 tibor.pacalat Note Edited: 77928
2023-10-24 17:30 DenisChenu Note Added: 77936
2023-10-24 17:30 DenisChenu File Added: Capture d’écran du 2023-10-24 17-29-17.png
2023-10-24 17:32 DenisChenu Note Added: 77937
2023-10-24 17:33 DenisChenu Assigned To DenisChenu => gabrieljenik
2023-10-24 17:33 DenisChenu Status assigned => ready for code review
2023-10-24 17:33 DenisChenu Note Added: 77938
2023-10-25 15:09 gabrieljenik Note Added: 77976
2023-10-25 15:21 gabrieljenik Assigned To gabrieljenik => tibor.pacalat
2023-10-25 15:21 gabrieljenik Status ready for code review => ready for testing
2023-10-25 17:15 DenisChenu Changeset attached => LimeSurvey master 590c1ac7
2023-10-25 17:15 DenisChenu Note Added: 77997
2023-10-25 17:15 DenisChenu Assigned To tibor.pacalat => DenisChenu
2023-10-25 17:15 DenisChenu Resolution reopened => fixed
2023-10-25 17:16 tibor.pacalat Status ready for testing => resolved
2023-10-25 17:16 tibor.pacalat Resolution fixed => duplicate
2023-10-25 17:16 tibor.pacalat Note Added: 77998
2023-10-25 17:18 DenisChenu Changeset attached => LimeSurvey 5.x 5e78af0e
2023-10-25 17:18 DenisChenu Changeset attached => LimeSurvey 5.x 5e78af0e
2023-10-25 17:18 DenisChenu Note Added: 77999
2023-10-25 17:18 DenisChenu Note Added: 78000
2023-10-25 17:18 DenisChenu Resolution duplicate => fixed
2023-10-25 17:18 DenisChenu Resolution duplicate => fixed
2023-10-30 10:54 LimeBot Note Added: 78131
2023-10-30 10:54 LimeBot Status resolved => closed
2023-10-30 10:54 LimeBot Bug heat 10 => 12