# Fatal error: Call to a member function getConfig()

**URL:** https://forum.shopware.com/t/fatal-error-call-to-a-member-function-getconfig/3755
**Category:** Shopware 3.5
**Tags:** programming
**Created:** [3. August 2011 um 13:42 UTC](https://forum.shopware.com/t/fatal-error-call-to-a-member-function-getconfig/3755 "2011-08-03T13:42:14Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![ottscho](https://avatars.discourse-cdn.com/v4/letter/o/7ba0ec/32.png) [@ottscho](https://forum.shopware.com/u/ottscho)
#### Post date: [3. August 2011 um 13:42 UTC](https://forum.shopware.com/t/fatal-error-call-to-a-member-function-getconfig/3755/1 "2011-08-03T13:42:14Z")

</div>

Hey, ich bekomme mal wieder eine Fehlermeldung, wenn ich bei einem Plugin die Config abrufen möchte: ` Fatal error: Call to a member function getConfig() on a non-object in /kunden/117539\_78141/webseiten/testshop/engine/Shopware/Components/Plugin/Bootstrap.php on line 182 ` Warum geht das nicht. Bei allen anderen Plugins geht es so auch: ` class Shopware\_Plugins\_Frontend\_OttschoCatCharts\_Bootstrap extends Shopware\_Components\_Plugin\_Bootstrap { /\* \* Install Method \* Create Events, Hooks and Insert Tables \*/ public function install() { $event = $this-\>createEvent( 'Enlight\_Controller\_Action\_PostDispatch\_Frontend\_Listing', 'onPostDispatchListing' ); $this-\>subscribeEvent($event); $form = $this-\>Form(); $form-\>setElement('text', 'TopcatID', array('label'=\>'ID der Top50 Kategorie','value'=\>'', 'scope'=\>Shopware\_Components\_Form::SCOPE\_SHOP)); $form-\>setElement('text', 'MaincatID', array('label'=\>'ID der Hauptkategorie','value'=\>'3', 'scope'=\>Shopware\_Components\_Form::SCOPE\_SHOP)); $form-\>save(); return true; } /\* \* @onPostDispatchListing \* Manipulate article listing site \*/ static function onPostDispatchListing(Enlight\_Event\_EventArgs $args) { $instance = Enlight\_Class::Instance(\_\_CLASS\_\_); $request = $args-\>getSubject()-\>Request(); $response = $args-\>getSubject()-\>Response(); $view = $args-\>getSubject()-\>View(); $config = Shopware()-\>Plugins()-\>Frontend()-\>OttschoCatCharts()-\>Config(); $view-\>Config = $config; ... ... ... ` Hat jmd eine Idee?

---

<div class="post-metadata">

### Author: ![radox1](https://avatars.discourse-cdn.com/v4/letter/r/e19b73/32.png) [@radox1](https://forum.shopware.com/u/radox1)
#### Post date: [15. August 2011 um 11:34 UTC](https://forum.shopware.com/t/fatal-error-call-to-a-member-function-getconfig/3755/2 "2011-08-15T11:34:24Z")

</div>

Hat hier schon jemand herausgefunden woran das liegt?

---

<div class="post-metadata">

### Author: ![ottscho](https://avatars.discourse-cdn.com/v4/letter/o/7ba0ec/32.png) [@ottscho](https://forum.shopware.com/u/ottscho)
#### Post date: [16. August 2011 um 07:52 UTC](https://forum.shopware.com/t/fatal-error-call-to-a-member-function-getconfig/3755/3 "2011-08-16T07:52:42Z")

</div>

Nein, ich glaube nicht. Ich habe den Fehler immer noch. Ich glaube bei mir hat es was mit den instancen zu tun. Aber bin mir nicht sicher. Ich bekomme es auf jeden Fall nicht gelöst.

---

<div class="post-metadata">

### Author: ![Heiner\_Lohaus](https://avatars.discourse-cdn.com/v4/letter/h/b5a626/32.png) [@Heiner\_Lohaus](https://forum.shopware.com/u/Heiner_Lohaus)
#### Post date: [16. August 2011 um 08:56 UTC](https://forum.shopware.com/t/fatal-error-call-to-a-member-function-getconfig/3755/4 "2011-08-16T08:56:55Z")

</div>

Wozu ist eigentlich dieser aufruf: `$instance = Enlight\_Class::Instance(\_\_CLASS\_\_); ` Kann der nicht eigentlich weg?
