View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
13407 | Bug reports | Plugins | public | 2018-02-22 21:46 | 2018-06-15 15:43 |
Reporter | orvil | Assigned To | ollehar | ||
Priority | none | Severity | crash | ||
Status | closed | Resolution | fixed | ||
Fixed in Version | 3.7.x | ||||
Summary | 13407: plugin events seems not to work | ||||
Description | Plugin event beforeQuestionRender shows no reaction. Example code here: <?php
| ||||
Steps To Reproduce | place code in a dummy plugin | ||||
Additional Information | As DenisChenu once mentioned beside the set a append and prepend would push plugin development | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Bug heat | 10 | ||||
Complete LimeSurvey version number (& build) | 3.4.0 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | any | ||||
Database type & version | MySql | ||||
Server OS (if known) | Debian Linux, Raspbian | ||||
Webserver software & version (if known) | Apache2 | ||||
PHP Version | 5.6.30 | ||||
traced the calls with $this->log("plugin helloWorld ... ");
|
|
Can we get a plugin to test with, please? |
|
Sorry, didn't see example in comment. Disregard. |
|
No problem, here it is. With additional log lines in init() and beforeQuestionRender() - activate them if required, logs to \tmp\runtime\plugin.log helloWorld.php (495 bytes)
<?php class helloWorld extends PluginBase { static protected $name = 'Hello World Test'; static protected $description = 'This is a Hello World plugin'; public function init() { $this->subscribe('beforeQuestionRender'); // $this->log("plugin helloWorld initiated"); } public function beforeQuestionRender() { // $this->log("plugin helloWorld recieved event beforeQuestionRender"); $this->getEvent()->set('questionhelp', 'Hello World'); } } |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=26597 |
|
I commit a fix to this issue, but it's not working exactly as before. Please pull and test. |
|
checked the fix withpublic function beforeQuestionRender()
|
|
Great, I'll put this on feedback until then. Thanks for your help! |
|
Thanks for your update! I checked out the following outputs according to https://manual.limesurvey.org/BeforeQuestionRender class: not sure, got no change others: not tested yet. |
|
It's the basic one, great thanks to olle and you to report. I had the other on a pull request :). And update manual about the replacement (it's not {QUESTION_TEXT} in template ;) ) |
|
@orvil : i think we have whole now. Please reopen if not |
|
Version 3.12.1 Build 180616 released |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2018-02-22 21:46 | orvil | New Issue | |
2018-02-22 22:46 | orvil | Note Added: 46728 | |
2018-02-23 14:32 | DenisChenu | Issue Monitored: DenisChenu | |
2018-02-23 15:34 | ollehar | Note Added: 46741 | |
2018-02-23 15:35 | ollehar | Note Added: 46742 | |
2018-02-23 23:02 | orvil | File Added: helloWorld.php | |
2018-02-23 23:02 | orvil | Note Added: 46744 | |
2018-02-26 13:47 | ollehar | Assigned To | => ollehar |
2018-02-26 13:47 | ollehar | Status | new => assigned |
2018-02-26 14:20 | ollehar | Changeset attached | => LimeSurvey master c381d36b |
2018-02-26 14:20 | ollehar | Note Added: 46750 | |
2018-02-26 14:20 | ollehar | Resolution | open => fixed |
2018-02-26 14:23 | ollehar | Note Added: 46751 | |
2018-02-26 14:23 | ollehar | Status | assigned => feedback |
2018-02-27 13:43 | orvil | Note Added: 46784 | |
2018-02-27 13:43 | orvil | Status | feedback => assigned |
2018-02-27 14:14 | ollehar | Note Added: 46786 | |
2018-02-27 14:14 | ollehar | Status | assigned => feedback |
2018-03-12 17:54 | orvil | Note Added: 47027 | |
2018-03-12 17:54 | orvil | Status | feedback => assigned |
2018-03-12 18:19 | DenisChenu | Note Added: 47028 | |
2018-03-12 18:21 | DenisChenu | Note Edited: 47028 | |
2018-05-26 10:59 | DenisChenu | Status | assigned => resolved |
2018-05-26 10:59 | DenisChenu | Fixed in Version | => 3.7.x |
2018-05-26 10:59 | DenisChenu | Note Added: 47862 | |
2018-06-15 15:43 | c_schmitz | Note Added: 48177 | |
2018-06-15 15:43 | c_schmitz | Status | resolved => closed |
2021-08-07 07:55 | guest | Bug heat | 8 => 10 |