View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
15973Bug reportsOtherpublic2020-03-23 13:09
ReporterDenisChenu Assigned ToDenisChenu  
PrioritynoneSeverityminor 
Status closedResolutionfixed 
Product Version3.22.9 
Fixed in Version4.1.12 
Summary15973: Invalid submitflaied received
Description

With inluded survey (lsa) : open token TEST and submit send a submitfailde"d.

Steps To Reproduce

Surely related to MariaDB version or config,

But

UPDATE `lime_survey_882577` SET `882577X1501X26289` = '2' WHERE `lime_survey_882577`.`id` = 16; 

Show 0 lines affected, then : have issue.

And since DB data are 2.000000, compare with 2 : send an email.

Additional Information

Maybe just remove the check ? If there are no error : there are no error .....

TagsNo tags attached.
Attached Files
Bug heat4
Complete LimeSurvey version number (& build)3.22.8 github
I will donate to the project if issue is resolvedNo
Browsernot relevant
Database type & version10.3.22-MariaDB
Server OS (if known)fedora/linux
Webserver software & version (if known)nginx
PHP Version7.3.15

Relationships

related to 15733 closedcdorin Survey administrator can receive invalid mail about error 

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2020-03-10 18:28

developer   ~56400

Last edited: 2020-03-10 18:28

Why 15733 didn't fix ? '2.00000000' != '2'

DenisChenu

DenisChenu

2020-03-10 18:37

developer   ~56402

Last edited: 2020-03-10 18:38

MariaDB : -1 mean an error : https://mariadb.com/kb/en/mysql_affected_rows/
MSSQL : unknow ???? https://mariadb.com/kb/en/mysql_affected_rows/
PGSQL : https://www.postgresql.org/docs/current/plpgsql-statements.html#PLPGSQL-STATEMENTS-DIAGNOSTICS ?

https://www.php.net/manual/en/pdostatement.rowcount.php

If the last SQL statement executed by the associated PDOStatement was a SELECT statement, some databases may return the number of rows returned by that statement. However, this behaviour is not guaranteed for all databases and should not be relied on for portable applications.

Yii use rowcount
https://github.com/LimeSurvey/LimeSurvey/blob/016b4220056ef12c52d54e64c8ca11a5b359b45f/framework/db/CDbCommand.php#L338
by
https://github.com/LimeSurvey/LimeSurvey/blob/016b4220056ef12c52d54e64c8ca11a5b359b45f/framework/db/CDbCommand.php#L1313

DenisChenu

DenisChenu

2020-03-10 18:46

developer   ~56403

To be tested.

Else : SQL error throw Exception.

DenisChenu

DenisChenu

2020-03-16 19:25

developer   ~56580

OK,

Fix need for 4.X too

For reproduce

  1. Survey with token
  2. A numeric question type
  3. Not datestamped
  4. Allow edit previous response (and token answer persistence)
  5. Open without edit, submit : error
DenisChenu

DenisChenu

2020-03-16 19:36

developer   ~56581

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

lime_release_bot

lime_release_bot

2020-03-23 13:09

administrator   ~56730

Fixed in Release 3.22.10+200323

Related Changesets

LimeSurvey: master 24b0b4e1

2020-03-16 19:36:23

DenisChenu

Details Diff
Fixed issue 15973: Invalid submitfailed received
Dev: PDOStatement::rowCount are unstable and unsure.
Dev: then don't use it if submitdate are not updated
Affected Issues
15973
mod - application/helpers/expressions/em_manager_helper.php Diff File

Issue History

Date Modified Username Field Change
2020-03-10 18:26 DenisChenu New Issue
2020-03-10 18:26 DenisChenu File Added: survey_archive_submitFailmed.lsa
2020-03-10 18:26 DenisChenu File Added: Capture d’écran du 2020-03-10 18-22-38.png
2020-03-10 18:26 DenisChenu File Added: Capture d’écran du 2020-03-10 18-23-08.png
2020-03-10 18:27 DenisChenu Relationship added related to 15733
2020-03-10 18:28 DenisChenu Note Added: 56400
2020-03-10 18:28 DenisChenu Note Edited: 56400
2020-03-10 18:37 DenisChenu Note Added: 56402
2020-03-10 18:38 DenisChenu Note Edited: 56402
2020-03-10 18:46 DenisChenu Assigned To => ollehar
2020-03-10 18:46 DenisChenu Status new => ready for testing
2020-03-10 18:46 DenisChenu Note Added: 56403
2020-03-16 19:25 DenisChenu File Added: survey_archive_submitFailed.lsa
2020-03-16 19:25 DenisChenu File Added: survey_archive_submitFailed_4.lsa
2020-03-16 19:25 DenisChenu File Added: Capture d’écran du 2020-03-16 19-23-30.png
2020-03-16 19:25 DenisChenu Note Added: 56580
2020-03-16 19:36 DenisChenu Changeset attached => LimeSurvey master 24b0b4e1
2020-03-16 19:36 DenisChenu Note Added: 56581
2020-03-16 19:36 DenisChenu Assigned To ollehar => DenisChenu
2020-03-16 19:36 DenisChenu Resolution open => fixed
2020-03-17 08:31 DenisChenu Status ready for testing => resolved
2020-03-17 08:31 DenisChenu Fixed in Version => 4.1.12
2020-03-23 13:09 lime_release_bot Note Added: 56730
2020-03-23 13:09 lime_release_bot Status resolved => closed