View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
15793 | Bug reports | Plugins | public | 2020-01-28 18:12 | 2021-03-07 21:42 |
Reporter | jonasdoerken | Assigned To | ollehar | ||
Priority | normal | Severity | partial_block | ||
Status | closed | Resolution | fixed | ||
Product Version | 4.0.1 | ||||
Summary | 15793: Upgrading Plugin from 3.* to 4.0 not possible, API calls throw error | ||||
Description | Hello everybody, If there is still work to be done, i'd like to help and contribute but I would like to know if i misunderstood something. | ||||
Steps To Reproduce | Create Plugin and try to call getQuestions | ||||
Additional Information | https://www.limesurvey.org/forum/plugins/120116-upgrading-plugin-from-3-to-4-0 is the forum thread for that. If this is a bug im gladly ready to fix this myself and create a pull request on github. | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Bug heat | 8 | ||||
Complete LimeSurvey version number (& build) | Version 4.0.1+200120 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | |||||
Database type & version | MariaDB | ||||
Server OS (if known) | Debian | ||||
Webserver software & version (if known) | |||||
PHP Version | 7.4 | ||||
cdorin told me in IRC i should add him here, so this is my attempt @cdorin |
|
@jonasdoerken : about config.xml files : it's to avoid to broke instance in such situation. Move for 3.X to 4. X : yes we upadte API numbre, then previous method didn'tb work. \QUestion::model are not inside API https://github.com/LimeSurvey/LimeSurvey/blob/master/application/libraries/PluginManager/LimesurveyApi.php Maybe you can create a |
|
Hello Denis, thank you very much for your answer. If i understand you correctly, there is already a function at the LimsurveyAPI called getQuestions, which is working fine if i comment out the conditions line regarding the language. I attached you the function in the limesurveyAPI i'm talking about. In your Github link its the line https://github.com/LimeSurvey/LimeSurvey/blob/71898e9d27fbfe439ecd685cdf100f4d2118e908/application/libraries/PluginManager/LimesurveyApi.php#L400 Thank you very much for your time! |
|
I never write or say that. Question are not in Plugin Api … then : you must rewriter your plugin using the same method than LimeSurvey. Please : better read
|
|
Hello, Denis, I think we're getting off on the wrong foot. I expressed myself wrong. The getQuestions function is already in the API, I linked it to you. But since the upgrade it doesn't work anymore because the column language is missing in the question table. Once again in short: getQuestions worked with 3., but does not work with 4. anymore. So the Model Question is available in the API as return value. Sorry for the misunderstanding caused by my formulation. Of course I can't use the API in my plugin anymore and directly access the models, but that's what it's there for, isn't it? |
|
Arg, yes … sorry … You did good … bug in LimeSurvey LimesurveyApi.php file must be updated … Seems need |
|
Yes i can, thank you for your time! |
|
Please test on branch bug/15793-plugin-api-breaks. Also test with postgres. |
|
Direct link is so cooooooooooooooooooooooooooooooooooooooooool https://github.com/LimeSurvey/LimeSurvey/tree/bug/15793-plugin-api-breaks |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2020-01-28 18:12 | jonasdoerken | New Issue | |
2020-01-28 18:17 | jonasdoerken | Note Added: 55548 | |
2020-01-29 10:17 | DenisChenu | Note Added: 55556 | |
2020-01-29 13:30 | jonasdoerken | File Added: Anmerkung 2020-01-28 131709.jpg | |
2020-01-29 13:30 | jonasdoerken | Note Added: 55561 | |
2020-01-29 14:32 | DenisChenu | Note Added: 55562 | |
2020-01-29 14:54 | jonasdoerken | Note Added: 55564 | |
2020-01-29 15:03 | DenisChenu | Note Added: 55565 | |
2020-01-29 15:03 | DenisChenu | Note Edited: 55565 | |
2020-01-29 15:06 | jonasdoerken | Note Added: 55566 | |
2020-01-31 15:47 | ollehar | Assigned To | => ollehar |
2020-01-31 15:47 | ollehar | Status | new => confirmed |
2020-01-31 15:47 | ollehar | Priority | none => normal |
2020-01-31 17:10 | ollehar | Note Added: 55607 | |
2020-01-31 17:20 | DenisChenu | Note Added: 55609 | |
2020-02-10 17:37 | Mazi | Issue Monitored: Mazi | |
2021-03-07 21:42 | c_schmitz | Status | confirmed => closed |
2021-03-07 21:42 | c_schmitz | Resolution | open => fixed |
2021-08-09 19:06 | guest | Bug heat | 6 => 8 |