View Issue Details

This issue affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
20417Bug reportsOtherpublic2026-09-05 12:16
ReporterDenisChenu Assigned Toc_schmitz  
PrioritynoneSeverityminor 
Status resolvedResolutionfixed 
Product Version6.12.x 
Summary20417: Survey findByPk retuen invalid value if scope are set
Description

When using scope : Survey::model()->active()->findByPk or Survey::model()->open()->findByPk can retrun ivalid value (and in same case : Survey::model()->findByPk too)

Steps To Reproduce

Steps to reproduce

Import included plugin
Create a survey
Go to Plugin setting
Open Extension settings for the plugin

Expected result

See 5 green light

Actual result

2 red line

TagsNo tags attached.
Attached Files
Bug heat4
Complete LimeSurvey version number (& build) 6.16.5
I will donate to the project if issue is resolvedNo
Story point estimate
Browsernot relevant
Database type & versionnot relevant
Server OS (if known)not relevant
Webserver software & version (if known)not relevant
PHP Version8.4

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2026-02-05 17:00

developer   ~84177

I have a situation where Survey::model()->findByPk return null (with a valid survey) don't find clean way to reproduce.
See https://gitlab.com/SondagesPro/TokenManagement/TokenUsersListAndManage/-/commit/b3d17876615a1df1c73e9730523cd623ad6f6a83
(updated after)

c_schmitz

c_schmitz

2026-09-05 12:16

administrator   ~85581

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

Related Changesets

LimeSurvey: master bff1fd36

2026-09-05 12:16

c_schmitz


Details Diff
Fixed issue 20417: Survey findByPk returns invalid value if scope is set Affected Issues
20417
mod - application/models/Survey.php Diff File

Issue History

Date Modified Username Field Change
2026-02-05 16:58 DenisChenu New Issue
2026-02-05 16:58 DenisChenu File Added: reportIssueFindByPk.zip
2026-02-05 16:58 DenisChenu File Added: Capture d’écran du 2026-02-05 16-58-24.png
2026-02-05 17:00 DenisChenu Note Added: 84177
2026-02-05 17:00 DenisChenu Bug heat 0 => 2
2026-09-05 12:16 c_schmitz Changeset attached => LimeSurvey master bff1fd36
2026-09-05 12:16 c_schmitz Note Added: 85581
2026-09-05 12:16 c_schmitz Assigned To => c_schmitz
2026-09-05 12:16 c_schmitz Status new => resolved
2026-09-05 12:16 c_schmitz Resolution open => fixed
2026-09-05 12:16 c_schmitz Bug heat 2 => 4