View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
08364Bug reportsOtherpublic2013-11-25 15:40
ReporterResearchOnBlogs Assigned Tosammousa  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version2.05 RC 
Target Version2.05+Fixed in Version2.05+ 
Summary08364: Error in Plugin Example
Description

It seems that there is an error in the plugin. I got this:
Recoverable error

Argument 1 passed to Example::helloWorld() must be an instance of PluginEvent, none given

/Users/x/LOCAL-Websites/limesurvey-205beta/plugins/Example/Example.php(59)

47 public function afterAdminMenuLoaded(PluginEvent $event)
48 {
49 $menu = $event->get('menu', array());
50 $menu['left'][]=array(
51 'href' => "http://docs.limesurvey.org",
52 'alt' => gT('LimeSurvey online manual'),
53 'image' => 'showhelp.png'
54 );
55
56 $event->set('menu', $menu);
57 }
58
59 public function helloWorld(PluginEvent $event)
60 {
61 $count = (int) $this->get('count');
62 if ($count === false) $count = 0;
63 $count++;
64 $this->pluginManager->getAPI()->setFlash($this->get('message') . $count);
65 $this->set('count', $count);
66 }
67
68
69 /*
70
This event is fired by the administration panel to gather extra settings
71 * available for a survey.

Stack Trace
#0
unknown(0): Example->helloWorld()
#1

/Users/kxxot/LOCAL-Websites/limesurvey-205beta/application/libraries/PluginManager/PluginManager.php(171): call_user_func(array(Example, "helloWorld"))

166 {
167 if (!$event->isStopped()
168 && (empty($target) || in_array(get_class($subscription[0]), $target)))
169 {
170 $subscription[0]->setEvent($event);
171 call_user_func($subscription);
172 }
173 }
174 }
175
176 return $event;

#2

/Users/xxxt/LOCAL-Websites/limesurvey-205beta/application/libraries/PluginManager/PluginManager.php(305): PluginManager->dispatchEvent(PluginEvent)

300 }
301 } catch (Exception $exc) {
302 // Something went wrong, maybe no database was present so we load no plugins
303 }
304
305 $this->dispatchEvent(new PluginEvent('afterPluginLoad', $this)); // Alow plugins to do stuff after all plugins are loaded
306 }
307
308 /*
309
Get a list of question objects and load some information about them.
310 * This registers the question object classes with Yii.

#3

/Users/kxt/LOCAL-Websites/limesurvey-205beta/application/core/LSYii_Application.php(170): PluginManager->loadPlugins()

165 Yii::import('application.libraries.PluginManager.Storage.');
166 Yii::import('application.libraries.PluginManager.Question.
');
167 $this->pluginManager = new PluginManager($this->getApi());
168
169 // And load the active plugins
170 $this->pluginManager->loadPlugins();
171 }
172
173 /*
174
Loads a helper
175 *

TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)131105
I will donate to the project if issue is resolvedNo
BrowserFF 25 mac, Chrome
Database type & versionx
Server OS (if known)x
Webserver software & version (if known)x
PHP Versionx

Users monitoring this issue

There are no users monitoring this issue.

Activities

sammousa

sammousa

2013-11-21 10:00

reporter   ~27277

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

c_schmitz

c_schmitz

2013-11-25 15:40

administrator   ~27389

2.05RC7 released

Related Changesets

LimeSurvey: 2.05 a8ae5792

2013-11-21 08:59:53

sammousa

Details Diff
Fixed issue 08364: Error in Plugin Example Affected Issues
08364
mod - plugins/Demo/Example/Example.php Diff File

Issue History

Date Modified Username Field Change
2013-11-13 17:32 ResearchOnBlogs New Issue
2013-11-21 00:22 c_schmitz Assigned To => sammousa
2013-11-21 00:22 c_schmitz Status new => assigned
2013-11-21 10:00 sammousa Changeset attached => LimeSurvey 2.05 a8ae5792
2013-11-21 10:00 sammousa Note Added: 27277
2013-11-21 10:00 sammousa Resolution open => fixed
2013-11-21 10:00 sammousa Status assigned => resolved
2013-11-22 11:28 c_schmitz Target Version => 2.05+
2013-11-25 15:40 c_schmitz Fixed in Version => 2.05+
2013-11-25 15:40 c_schmitz Note Added: 27389
2013-11-25 15:40 c_schmitz Status resolved => closed