View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
08410Bug reportsSurvey takingpublic2013-12-02 21:26
Reporterfairsay Assigned Toc_schmitz  
PrioritynormalSeveritypartial_block 
Status closedResolutionfixed 
Product Version2.00+ 
Fixed in Version2.00+ 
Summary08410: Save fails on final submit for token with participant_id
Description

I have a survey (using build 131122) which is 'closed' but for which people can register and has a token table populated from the participant database. Whenever someone new registers, they complete the survey with no problem (it seems). But when someone with a token and a participant_id goes to complete the survey, it fails on the last step.

The error message when the config.php debug = 2 is:
Strict Standards: Creating default object from empty value in /ebs/www/html/surveys/application/helpers/frontend_helper.php on line 965 Fatal error: Call to undefined method stdClass::save() in /ebs/www/html/surveys/application/helpers/frontend_helper.php on line 970

Steps To Reproduce

1) Populate participants
2) Create survey (closed but allow registration)
3) Add participants to survey (and generate tokens)
4) Have one of the existing participants complete the survey
5) See if the completion page displays (a symptom) and if the data is saved correctly (problem) and/or if the error above occurs.

TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)131122
I will donate to the project if issue is resolvedNo
BrowserChrome, Safari
Database type & versionMySQL 5.0
Server OS (if known)Amazon Linux
Webserver software & version (if known)Apache 2.2.25
PHP Version5.3.27

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2013-11-26 14:11

administrator   ~27406

You should not enforce strict standards on production machines.

fairsay

fairsay

2013-11-26 14:48

reporter   ~27407

I only did it temporarily (<30 seconds) to see if I could find the error that was causing the problems I was encountering.

fairsay

fairsay

2013-11-26 17:22

reporter   ~27411

Last edited: 2013-11-26 22:17

I've resorted to a workaround that seems to work: setting participant_id to NULL in to tokens table.

Not sure if anyone can replicate this or if it is a problem only I have encountered (logging it here in case others encounter it).

Description looks similar to 07278 except that this issue (08410) also includes a participant_id value.

c_schmitz

c_schmitz

2013-11-27 12:07

administrator   ~27418

You wrote 'it fails on the last step.' How does it exactly fail?

fairsay

fairsay

2013-11-27 12:14

reporter   ~27419

Sorry - should have been clearer. In production mode, it fails in two ways:
1) The completion page is blank
2) The data, at least from the last step, isn't saved

When I make the participant_id null in the tokens table, both these issues go away and things work normally.

c_schmitz

c_schmitz

2013-11-27 13:52

administrator   ~27424

I see - Although it is also a kink in the source code the basic problem is still that your PHP is configured to strict standards (it does not matter if debug is on or off). PHP recommends to not show use STRICT error level on production machines.

c_schmitz

c_schmitz

2013-11-27 13:56

administrator   ~27425

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

c_schmitz

c_schmitz

2013-11-27 14:04

administrator   ~27426

Fix committed to 2.05 branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&amp;id=13518

fairsay

fairsay

2013-11-27 14:23

reporter   ~27427

Great - I just implemented the code on my current version and it seems to work with both the scenario where participant_id exists in the token table and where it is null.

As for the the php strict error level, I'll investigate how to reduce it. I hadn't set it explicitly to anything but will now look to take it off strict.

c_schmitz

c_schmitz

2013-12-02 21:26

administrator   ~27470

Version 2.00+ Build 131202 released

Related Changesets

LimeSurvey: master 55cb1972

2013-11-27 12:56:29

c_schmitz

Details Diff
Fixed issue 08410: Save fails on final submit for token with participant_id Affected Issues
08410
mod - application/helpers/frontend_helper.php Diff File

LimeSurvey: 2.05 a9bc05a8

2013-11-27 13:05:16

c_schmitz

Details Diff
Fixed issue 08410: Save fails on final submit for token with participant_id Affected Issues
08410
mod - application/helpers/frontend_helper.php Diff File

Issue History

Date Modified Username Field Change
2013-11-26 13:57 fairsay New Issue
2013-11-26 14:11 c_schmitz Note Added: 27406
2013-11-26 14:48 fairsay Note Added: 27407
2013-11-26 17:22 fairsay Note Added: 27411
2013-11-26 22:17 fairsay Note Edited: 27411
2013-11-27 12:07 c_schmitz Note Added: 27418
2013-11-27 12:07 c_schmitz Assigned To => c_schmitz
2013-11-27 12:07 c_schmitz Status new => feedback
2013-11-27 12:14 fairsay Note Added: 27419
2013-11-27 12:14 fairsay Status feedback => assigned
2013-11-27 13:52 c_schmitz Note Added: 27424
2013-11-27 13:56 c_schmitz Changeset attached => LimeSurvey master 55cb1972
2013-11-27 13:56 c_schmitz Note Added: 27425
2013-11-27 13:56 c_schmitz Resolution open => fixed
2013-11-27 13:56 c_schmitz Status assigned => resolved
2013-11-27 13:56 c_schmitz Fixed in Version => 2.00+
2013-11-27 14:04 c_schmitz Changeset attached => LimeSurvey 2.05 a9bc05a8
2013-11-27 14:04 c_schmitz Note Added: 27426
2013-11-27 14:23 fairsay Note Added: 27427
2013-12-02 21:26 c_schmitz Note Added: 27470
2013-12-02 21:26 c_schmitz Status resolved => closed