View Issue Details

This bug affects 1 person(s).
 10
IDProjectCategoryView StatusLast Update
18818Bug reportsPluginspublic2023-07-04 14:08
Reportergabrieljenik Assigned Totibor.pacalat  
PrioritynoneSeveritycrash 
Status closedResolutionfixed 
Product Version6.0.x 
Summary18818: Plugin API: getQuestions dump
Description

When calling getQuestions() on the API, a dump happens.

Steps To Reproduce

Dump:

Table "lime_questions" does not have a column named "language".

Additional Information

Language is used in the filtering criteria (I guess legacy from LTS model), while that's not allowed anymore.

TagsNo tags attached.
Attached Files
image.png (49,361 bytes)   
image.png (49,361 bytes)   
Bug heat10
Complete LimeSurvey version number (& build)5.x
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMysql
Server OS (if known)
Webserver software & version (if known)
PHP Version7

Users monitoring this issue

There are no users monitoring this issue.

Activities

ollehar

ollehar

2023-05-17 10:40

administrator   ~75017

Last edited: 2023-05-17 10:42

Oh yeah, the LimeSurvey API class... Without a test suite to ensure it's correct, I would not depend on it. :|

Probably broken since Carsten's l18n fix some years ago.

gabrieljenik

gabrieljenik

2023-05-17 18:44

manager   ~75044

PR v5: https://github.com/LimeSurvey/LimeSurvey/pull/3144
Shall do the same for v6?

I will work a bit on some unit tests for the plugin API.
Stil, I think this can be merged without the unit tests, right?

gabrieljenik

gabrieljenik

2023-05-17 18:53

manager   ~75045

The question model made a change which is not backward compatible.
I believe we shouldn't keep this API method backward compatible.
Will drive ourselves crazy trying to do that and mantaining it.

DenisChenu

DenisChenu

2023-05-18 18:18

developer   ~75093

I believe we shouldn't keep this API method backward compatible.

Yes : but return null avoid more dump

DenisChenu

DenisChenu

2023-05-18 18:21

developer   ~75094

2 way to fix

  1. Return question object without language : potential issue in 7 or 7.8 or 9.3 etc …
  2. Return null value (and create a dev issue about : what do we need here)
gabrieljenik

gabrieljenik

2023-05-18 18:23

manager   ~75095

Yes : but return null avoid more dump

Right now, if someone is using it, it is already getting a dump.
If we return null, there will be no dump but some unexpected weird behaviour for them as it, in the best cases, leave the execution flow unexpectedly.

guest

guest

2023-06-16 09:44

viewer   ~75658

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

guest

guest

2023-06-16 09:44

viewer   ~75659

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

LimeBot

LimeBot

2023-06-19 11:54

administrator   ~75714

Fixed in Release 5.6.27+230621

gabrieljenik

gabrieljenik

2023-06-20 21:01

manager   ~75755

Master: https://github.com/LimeSurvey/LimeSurvey/pull/3234

guest

guest

2023-07-04 14:08

viewer   ~75930

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

Related Changesets

LimeSurvey: 5.x e0f05088

2023-06-16 09:44:39

Gabriel Jenik


Committer: GitHub Details Diff
Fixed issue 18818: dump when using getQuestions API (#3144)

Co-authored-by: lapiudevgit <devgit@lapiu.biz>
Affected Issues
18818
mod - application/libraries/PluginManager/LimesurveyApi.php Diff File
add - tests/data/surveys/survey_GetQuestionTest.lss Diff File
add - tests/unit/plugins/LimesurveyApi/GetQuestionsTest.php Diff File

LimeSurvey: 5.x e0f05088

2023-06-16 09:44:39

Gabriel Jenik


Committer: GitHub Details Diff
Fixed issue 18818: dump when using getQuestions API (#3144)

Co-authored-by: lapiudevgit <devgit@lapiu.biz>
Affected Issues
18818
mod - application/libraries/PluginManager/LimesurveyApi.php Diff File
add - tests/data/surveys/survey_GetQuestionTest.lss Diff File
add - tests/unit/plugins/LimesurveyApi/GetQuestionsTest.php Diff File

LimeSurvey: master 40eecfa2

2023-07-04 13:08:13

Gabriel Jenik


Committer: GitHub Details Diff
Fixed issue 18818: dump when using getQuestions API (#3234)

Co-authored-by: Lapiu Dev <devgit@lapiu.biz>
Affected Issues
18818
mod - application/libraries/PluginManager/LimesurveyApi.php Diff File
add - tests/data/surveys/survey_GetQuestionTest.lss Diff File
add - tests/unit/plugins/LimesurveyApi/GetQuestionsTest.php Diff File

Issue History

Date Modified Username Field Change
2023-05-16 22:10 gabrieljenik New Issue
2023-05-16 22:10 gabrieljenik File Added: image.png
2023-05-16 22:11 gabrieljenik Assigned To => gabrieljenik
2023-05-16 22:11 gabrieljenik Status new => assigned
2023-05-16 22:12 gabrieljenik Additional Information Updated
2023-05-17 10:40 ollehar Note Added: 75017
2023-05-17 10:40 ollehar Bug heat 0 => 2
2023-05-17 10:42 ollehar Note Edited: 75017
2023-05-17 18:44 gabrieljenik Note Added: 75044
2023-05-17 18:44 gabrieljenik Bug heat 2 => 4
2023-05-17 18:53 gabrieljenik Note Added: 75045
2023-05-17 19:57 gabrieljenik Assigned To gabrieljenik => DenisChenu
2023-05-17 19:57 gabrieljenik Status assigned => ready for code review
2023-05-18 18:18 DenisChenu Note Added: 75093
2023-05-18 18:18 DenisChenu Bug heat 4 => 6
2023-05-18 18:19 DenisChenu Assigned To DenisChenu => ollehar
2023-05-18 18:19 DenisChenu Status ready for code review => in code review
2023-05-18 18:21 DenisChenu Note Added: 75094
2023-05-18 18:23 gabrieljenik Note Added: 75095
2023-06-12 16:09 gabrieljenik Assigned To ollehar => tibor.pacalat
2023-06-12 16:09 gabrieljenik Status in code review => ready for merge
2023-06-16 09:44 Changeset attached => LimeSurvey 5.x e0f05088
2023-06-16 09:44 Changeset attached => LimeSurvey 5.x e0f05088
2023-06-16 09:44 guest Note Added: 75658
2023-06-16 09:44 guest Note Added: 75659
2023-06-16 09:44 guest Bug heat 6 => 8
2023-06-16 09:44 guest Bug heat 6 => 8
2023-06-19 11:54 LimeBot Note Added: 75714
2023-06-19 11:54 LimeBot Status ready for merge => closed
2023-06-19 11:54 LimeBot Resolution open => fixed
2023-06-19 11:54 LimeBot Bug heat 8 => 10
2023-06-20 21:01 gabrieljenik Assigned To tibor.pacalat => DenisChenu
2023-06-20 21:01 gabrieljenik Status closed => ready for code review
2023-06-20 21:01 gabrieljenik Note Added: 75755
2023-06-21 14:56 gabrieljenik Assigned To DenisChenu => tibor.pacalat
2023-06-21 14:56 gabrieljenik Status ready for code review => ready for merge
2023-07-04 13:08 tibor.pacalat Status ready for merge => closed
2023-07-04 14:08 Changeset attached => LimeSurvey master 40eecfa2
2023-07-04 14:08 guest Note Added: 75930