View Issue Details

This issue affects 2 person(s).
 18
IDProjectCategoryView StatusLast Update
17692Bug reportsSurvey takingpublic2026-10-26 13:51
ReporterMazi Assigned Toc_schmitz  
PrioritynoneSeverityminor 
Status closedResolutionfixed 
Product Version3.25.13 
Summary17692: Missing data set ID info at "Error saving results" email
Description

If Limesurvey fails to save a response, a "Error saving results" email is sent including the response details, see screenshot.
The problem is that this email holds no information about the data set ID so we can't look up to what extend data may have been saved previously.

On a side note: What setting do we need to activate to include the full fialing SQL statement at the error email? Is that only doable by enabling debiug mode?

Steps To Reproduce

Steps to reproduce

This is difficult to reproduce, You need to force e.g. an SQL error by entering some invalid input.

Expected result

Include the data set ID at the error email.

Actual result

Missing data set ID information
(Write here what happened instead)

TagsNo tags attached.
Attached Files
image.png (38,085 bytes)   
image.png (38,085 bytes)   
Bug heat18
Complete LimeSurvey version number (& build)Version 3.25.14+210218
I will donate to the project if issue is resolvedNo
BrowserChrome
Database type & versionMySQL
Server OS (if known)Linux
Webserver software & version (if known)Apache
PHP Version7.3
Git branch / Pull Request URL

Users monitoring this issue

There are no users monitoring this issue.

Activities

riqcles

riqcles

2022-04-29 17:45

reporter   ~69306

here you can see : https://forums.limesurvey.org/forum/french-forum/122853-erreur-de-sauvegarde?start=0

but i must trad this :)

soon.

DenisChenu

DenisChenu

2022-04-29 21:09

developer   ~69314

@riqcles : Marcel ask to hav reponse->id in returned information.

Not about the issue … why this question was not saved …

DenisChenu

DenisChenu

2022-04-29 21:13

developer   ~69315

On a side note: What setting do we need to activate to include the full failing SQL statement at the error email? Is that only doable by enabling debiug mode?

We must have a better way to return the issue , the exact SQL error seem the best. And maybe the complete request.

Mazi

Mazi

2022-05-17 12:18

updater   ~69715

@DeniChenu, I agree, the more information gets included, the easier it is to track this down.

@galads, can we add this to the next sprint? It affects many users.

gabrieljenik

gabrieljenik

2022-07-19 15:35

developer   ~71015

The error mail is only sent in two cases:

1) Response creation failed
2) You want to update an answer that does not exist (eg: the admin deleted the incomplete answer while someone else was completing it).

In the first case, the ID cannot be included in the mail because it does not exist.
In the second case it could be included, but I don't know if it is of much use in most cases.

On the subject of SQL, apparently it is never included. Looks like it was used at some point, but not anymore. And with the use of ActiveRecord it is not easy to do it.

We could create a logger, but that will hit performance.

As per the ID, althgouh we can't include the ID, we could include the max id on the table at that time :)
That could give a sense of where the record should have been located in the table.
Again, not sure it is worth it.

DenisChenu

DenisChenu

2022-07-20 11:12

developer   ~71046

On the subject of SQL, apparently it is never included. Looks like it was used at some point, but not anymore. And with the use of ActiveRecord it is not easy to do it.

We could create a logger, but that will hit performance.

We can not get the SQL error message ?

I think i have a way to get SQL error on survey , i send instruction after. Then we have a system to try to get the SQL error :)

c_schmitz

c_schmitz

2026-10-25 17:14

administrator   ~86785

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

LimeBot

LimeBot

2026-10-26 13:51

administrator   ~86832

Fixed in Release 7.8.0+261026

Related Changesets

LimeSurvey: master b3916696

2026-10-25 17:03

c_schmitz


Details Diff
Fixed issue 17692: The "Error saving results" email did not include the response ID, and a database error while saving answers showed an error page without sending the email
Dev submitfailed() adds the response ID from the session when the response row exists; a database exception from encryptSave() in LimeExpressionManager::_UpdateValuesInDatabase() is caught and passed to submitfailed() as error message
Affected Issues
17692
mod - application/helpers/expressions/em_manager_helper.php Diff File
mod - application/helpers/frontend_helper.php Diff File

Issue History

Date Modified Username Field Change
2021-11-02 09:18 Mazi New Issue
2021-11-02 09:18 Mazi File Added: image.png
2022-04-29 17:45 riqcles Note Added: 69306
2022-04-29 17:45 riqcles Bug heat 0 => 8
2022-04-29 21:09 DenisChenu Note Added: 69314
2022-04-29 21:09 DenisChenu Bug heat 8 => 10
2022-04-29 21:13 DenisChenu Note Added: 69315
2022-05-17 12:18 Mazi Note Added: 69715
2022-05-17 12:18 Mazi Bug heat 10 => 12
2022-07-19 15:35 gabrieljenik Note Added: 71015
2022-07-19 15:35 gabrieljenik Bug heat 12 => 14
2022-07-20 11:12 DenisChenu Note Added: 71046
2022-07-20 15:47 gabrieljenik Status new => confirmed
2026-10-25 17:14 c_schmitz Changeset attached => LimeSurvey master b3916696
2026-10-25 17:14 c_schmitz Note Added: 86785
2026-10-25 17:14 c_schmitz Assigned To => c_schmitz
2026-10-25 17:14 c_schmitz Status confirmed => resolved
2026-10-25 17:14 c_schmitz Resolution open => fixed
2026-10-25 17:14 c_schmitz Bug heat 14 => 16
2026-10-26 13:51 LimeBot Note Added: 86832
2026-10-26 13:51 LimeBot Status resolved => closed
2026-10-26 13:51 LimeBot Bug heat 16 => 18