View Issue Details

This bug affects 1 person(s).
 2
IDProjectCategoryView StatusLast Update
18138Bug reportsSurvey editingpublic2022-05-27 22:49
Reportergabrieljenik Assigned To 
PrioritynoneSeveritypartial_block 
Status confirmedResolutionopen 
Product Version5.3.x 
Summary18138: When entering the survey setting screen, the survey theme being loaded needs reviewal.
Description

The process needs reviewal.

When you enter the administration page of a survey, the theme being picked up (the one got in getSurveyInfo) is not the one of the survey, but the one of the group. That is, even if the survey does not inherit from the group, on those screens it ends up "inheriting" it anyway. Why? Because of this:

    public function setOptionsFromDatabase()
    {
        // set real survey options with inheritance
        $this->bShowRealOptionValues = false;
        $this->setOptions($this->gsid);
    }

Since the survey administration screens go through SurveyAdministrationController::actionRendersidemenulink() , setOptionsFromDatabase() is called, causing $survey->options to have the values ​​from the group instead of the survey.

Then the same controller, in the beforeRender() calls LimeExpressionManager::StartProcessingPage(false, true), which ends up calling templatereplace("{SID}") (not sure why is that needed). There, the template returned by getSurveyInfo is the one used, merging the attributes of the survey with those of "options" (which are the ones that went wrong).

Steps To Reproduce

Picked up while reviewing 18085

TagsNo tags attached.
Bug heat2
Complete LimeSurvey version number (& build)5.3.10 220419
I will donate to the project if issue is resolvedNo
BrowserChrome
Database type & versionPostgresql, EnterpriseDB 10.9.17
Server OS (if known)Windows
Webserver software & version (if known)NGINX
PHP VersionPHP 8, php-cgi

Relationships

related to 18116 closedgabrieljenik Ability to disable animation layer regarding saving in header section 

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2022-05-21 15:48

developer   ~69957

It's a bad ordering ?
$survey->options must be

  1. global
  2. Group replaced if not inherit
  3. Surey replaced if not inherit

I tghink we have a discussion about an

array_merge(
global,
array_filter(group),
array_filter(survey),
);

Somewhere

Issue History

Date Modified Username Field Change
2022-05-20 21:01 gabrieljenik New Issue
2022-05-20 21:01 gabrieljenik Issue generated from: 18085
2022-05-21 15:48 DenisChenu Note Added: 69957
2022-05-21 15:48 DenisChenu Bug heat 0 => 2
2022-05-24 15:23 DenisChenu Relationship added related to 18116
2022-05-27 22:49 gabrieljenik Status new => confirmed