View Issue Details

This issue affects 1 person(s).
 0
IDProjectCategoryView StatusLast Update
20863Bug reportsSurvey editingpublic2026-11-17 21:38
Reportermacwinnie Assigned To 
PrioritynoneSeveritycrash 
Status newResolutionopen 
Product Version7.11.x 
Summary20863: Question & Group Overview fails due to missing language in relation query
Description

Opening Question & Group Overview fails for all surveys with:

Using null as an array offset is deprecated
vendor/yiisoft/yii/framework/db/ar/CActiveRecord.php:743

The stack trace points to Yii's addRelatedRecord() when loading the questiongroupl10ns relation.

Steps To Reproduce

Cause

QuestionGroupL10n.php defines:

public function defaultScope()
{
    return array('index' => 'language');
}

However, QuestionGroup.php (around line 387) excludes language from the selected columns:

$criteria->with = array('questiongroupl10ns' => array("select" => "group_name, description"));

This appears to cause Yii to use null as the relation index.

Confirmed workaround

Explicitly including language resolves the error:

- $criteria->with = array('questiongroupl10ns' => array("select" => "group_name, description"));
+ $criteria->with = array('questiongroupl10ns' => array("select" => "group_name, description, language"));

Expected behavior

The Question & Group Overview should load without errors.

Suggested fix

Include language in the relation's selected columns, as required by the model's defaultScope() index.

TagsNo tags attached.
Bug heat0
Complete LimeSurvey version number (& build)7.11.0+261116
I will donate to the project if issue is resolvedNo
BrowserFirefox and any other tested (Safari, Chrome, ...)
Database type & versionMariaDB 13.0.2
Server OS (if known)
Webserver software & version (if known)
PHP Version8.5.12
Git branch / Pull Request URL

Users monitoring this issue

There are no users monitoring this issue.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2026-11-17 21:38 macwinnie New Issue