View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
17912Bug reportsSurvey takingpublic2022-02-28 12:58
Reporterjackrabbithanna Assigned Toc_schmitz  
PrioritynoneSeverityminor 
Status closedResolutionfixed 
Product Version5.2.x 
Summary17912: Erroneous "group empty of questions" error
Description

We've discovered what I think is a bug, in the QuestionGroup model
See here :
https://github.com/LimeSurvey/LimeSurvey/blob/master/application/models/QuestionGroup.php#L438
and here:
https://github.com/LimeSurvey/LimeSurvey/blob/master/application/models/QuestionGroup.php#L462

Both functions, that have querys, use the same emcache key, but the purpose of the functions is opposite.

PR coming

Steps To Reproduce

Steps to reproduce

It is difficult to find the exact steps to replicate. Intermitently, there will be an error
"There are empty question groups in this survey - please create at least one question within a question group."
in breakOutAndCrash() in frontend_helper.php

I believe this must be because in ./application/models/QuestionGroup.php .. there are conditions or contects where getTotalGroupsWithQuestions runs before getTotalGroupsWithoutQuestions() and the "wrong" value is cached.
Its a simple fix to use different cache keys for these queries.

Expected result

No error taking survey

Actual result

Error taking survey

TagsNo tags attached.
Bug heat8
Complete LimeSurvey version number (& build)at least from 5.1 and in the master branch now
I will donate to the project if issue is resolvedNo
Browser
Database type & versionN/A
Server OS (if known)
Webserver software & version (if known)
PHP VersionN/A

Users monitoring this issue

There are no users monitoring this issue.

Activities

jackrabbithanna

jackrabbithanna

2022-02-25 19:31

reporter   ~68411

PR https://github.com/LimeSurvey/LimeSurvey/pull/2270

guest

guest

2022-02-25 21:15

viewer   ~68412

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

c_schmitz

c_schmitz

2022-02-25 21:16

administrator   ~68413

Great catch! Thank you very much!

LimeBot

LimeBot

2022-02-28 12:58

administrator   ~68422

Fixed in Release 5.3.0+220228

Related Changesets

LimeSurvey: master 6615dff0

2022-02-25 21:15:41

jackrabbithanna


Committer: GitHub Details Diff
Fixed issue 17912: Sporadic "There are empty question groups in this survey " error (#2270) Affected Issues
17912
mod - application/models/QuestionGroup.php Diff File

Issue History

Date Modified Username Field Change
2022-02-25 19:30 jackrabbithanna New Issue
2022-02-25 19:31 jackrabbithanna Note Added: 68411
2022-02-25 19:31 jackrabbithanna Bug heat 0 => 2
2022-02-25 21:15 jackrabbithanna Changeset attached => LimeSurvey master 6615dff0
2022-02-25 21:15 guest Note Added: 68412
2022-02-25 21:15 guest Bug heat 2 => 4
2022-02-25 21:16 c_schmitz Assigned To => c_schmitz
2022-02-25 21:16 c_schmitz Status new => resolved
2022-02-25 21:16 c_schmitz Resolution open => fixed
2022-02-25 21:16 c_schmitz Note Added: 68413
2022-02-25 21:16 c_schmitz Bug heat 4 => 6
2022-02-28 12:58 LimeBot Note Added: 68422
2022-02-28 12:58 LimeBot Status resolved => closed
2022-02-28 12:58 LimeBot Bug heat 6 => 8