View Issue Details

IDProjectCategoryView StatusLast Update
14385Bug reports[All Projects] _ Unknownpublic2019-05-10 15:36
ReporterdominikvittAssigned ToDenisChenu 
PrioritylowSeverityfeature 
Status closedResolutionfixed 
Product Version4.0.0dev 
Target VersionFixed in Version4.0.0dev 
Summary14385: PHP warning on data entry page in debug mode
Description

There is a "PHP warning: Invalid argument supplied for foreach()" error when opening data entry page in debug mode.
I traced it back , so here are my findings.
questionSeq2relevance variable is empty because setVariableAndTokenMappingsForExpressionManager function in EM manager ends with execution on line
https://github.com/LimeSurvey/LimeSurvey/blob/986203663ff4580ea5c162b96dd4c5eb1b0014f1/application/helpers/expressions/em_manager_helper.php#L3643
because $_SESSION['LEMforceRefresh'] is never set.
So the rest of the function is never executed.
$_SESSION['LEMforceRefresh'] is set in function SetDirtyFlag, but it seems like this function doesn't work any more.

Steps To Reproduce

Debug mode is on.
Survey is activated.
Open Responses, click on "Data entry" button.
Warning should show immediately.
See attached HTML file.

Additional Information

@DenisChenu:
Please, can you try to reproduce it and see if you can find something.

TagsNo tags attached.
Complete LimeSurvey version number (& build)
I will donate to the project if issue is resolved
Browser
Database & DB-Version
Server OS (if known)
Webserver software & version (if known)
PHP Version

Activities

dominikvitt

dominikvitt

2018-12-28 14:46

developer  

PHP warning.html (20,778 bytes)
DenisChenu

DenisChenu

2018-12-31 17:19

developer   ~50082

@dominkvitt : i think : current sid can be different than the one needed ?

Maybe add a https://github.com/LimeSurvey/LimeSurvey/blob/986203663ff4580ea5c162b96dd4c5eb1b0014f1/application/helpers/expressions/em_manager_helper.php#L751 call somewhere.

DenisChenu

DenisChenu

2019-01-03 15:02

developer   ~50090

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

DenisChenu

DenisChenu

2019-01-03 15:04

developer   ~50091

@dominikvitt : real fix is here : https://github.com/LimeSurvey/LimeSurvey/commit/6347619893a4630a57d288a49d0dbc6b529702ee#diff-796aba4d06254b9caea9d461e4ea80c9
Only in EM : isset VS is_empty :).

I try to save : get a white page …

c_schmitz

c_schmitz

2019-05-10 15:36

administrator   ~51887

4.0beta1 released

Related Changesets

LimeSurvey: develop 63476198

2019-01-03 15:02:39

DenisChenu

Details Diff
Dev: Fixed issue 14385: PHP warning on data entry page in debug mode
Dev: fix some questionL10ns related bug in view
Affected Issues
14385
mod - application/controllers/admin/dataentry.php Diff File
mod - application/helpers/expressions/em_manager_helper.php Diff File
mod - application/views/admin/dataentry/content_view.php Diff File

Issue History

Date Modified Username Field Change
2018-12-28 14:46 dominikvitt New Issue
2018-12-28 14:46 dominikvitt Status new => assigned
2018-12-28 14:46 dominikvitt Assigned To => DenisChenu
2018-12-28 14:46 dominikvitt File Added: PHP warning.html
2018-12-31 17:19 DenisChenu Note Added: 50082
2019-01-03 13:28 DenisChenu Project Development => Bug reports
2019-01-03 13:28 DenisChenu Category Response browsing => Other issues
2019-01-03 13:28 DenisChenu Priority none => low
2019-01-03 13:28 DenisChenu Severity major => feature
2019-01-03 13:28 DenisChenu Category Other issues => _ Unknown
2019-01-03 13:28 DenisChenu Target Version 4.0.0dev =>
2019-01-03 15:02 DenisChenu Changeset attached => LimeSurvey develop 63476198
2019-01-03 15:02 DenisChenu Note Added: 50090
2019-01-03 15:02 DenisChenu Resolution open => fixed
2019-01-03 15:04 DenisChenu Note Added: 50091
2019-01-03 15:04 DenisChenu Status assigned => resolved
2019-01-03 15:04 DenisChenu Fixed in Version => 4.0.0dev
2019-05-10 15:36 c_schmitz Note Added: 51887
2019-05-10 15:36 c_schmitz Status resolved => closed