# \[GELÖST\] Formular - Store in Plugin - Konfiguration?

**URL:** <https://forum.shopware.com/t/gelost-formular-store-in-plugin-konfiguration/38792>\
**Category:** Programmierung\
**Created:** [4. August 2016 um 19:39 UTC](https://forum.shopware.com/t/gelost-formular-store-in-plugin-konfiguration/38792 "2016-08-04T19:39:50Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![sschreier](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/sschreier/32/23296_2.png) [@sschreier](https://forum.shopware.com/u/sschreier)\
**Post date:** [4. August 2016 um 19:39 UTC](https://forum.shopware.com/t/gelost-formular-store-in-plugin-konfiguration/38792/1 "2016-08-04T19:39:50Z")

</div>

Hallo liebe shopware - Gemeinde,

ich würde gern in der Plugin-Konfiguration eine Combobox anbieten, wo man eins der Formulare auswählen kann.

Leider liefert mir:

```
$form->setElement('combo', 'myfield', 
     array(
          'label' => '',
          'description' => '',
          'store' => 'base.Form',
          'scope' => Shopware\Models\Config\Element::SCOPE_SHOP,
          'value' => '',
          'valueField' => 'id',
          'displayField' => 'name'
     )
);

```

nicht wirklich die Liste der Formulare, sondern scheinbar den Namen des Plugins?

Hat einer eine Idee, woran es liegen kann oder was ich falsch gemacht habe?

Beste Grüße

Sebastian

&nbsp;

---

<div class="post-metadata">

**Author:** ![sschreier](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/sschreier/32/23296_2.png) [@sschreier](https://forum.shopware.com/u/sschreier)\
**Post date:** [5. August 2016 um 15:24 UTC](https://forum.shopware.com/t/gelost-formular-store-in-plugin-konfiguration/38792/2 "2016-08-05T15:24:42Z")

</div>

Hallo,

hat das wirklich noch nie jemand gebraucht oder genutzt? Oder hat von Shopware jemand einen Tipp, woran es liegen könnte [@Moritz Naczenski]([http://forum.shopware.com/profile/14574/Moritz](http://forum.shopware.com/profile/14574/Moritz) Naczenski “Moritz Naczenski”)‍ oder [@Stephan Pohl]([http://forum.shopware.com/profile/2/Stephan](http://forum.shopware.com/profile/2/Stephan) Pohl “Stephan Pohl”)‍ ?

Beste Grüße

Sebastian

---

<div class="post-metadata">

**Author:** ![Michael\_Telgmann](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/michael_telgmann/32/20289_2.png) [@Michael\_Telgmann](https://forum.shopware.com/u/Michael_Telgmann)\
**Post date:** [8. August 2016 um 08:27 UTC](https://forum.shopware.com/t/gelost-formular-store-in-plugin-konfiguration/38792/3 "2016-08-08T08:27:02Z")

</div>

Hi Sebastian,

versuche mal statt base.Form folgendes zu nutzen: ‘Shopware.apps.Base.store.Form’

Bist du unter 5.2 unterwegs? Neues oder “altes” Plugin-System?

Viele Grüße aus Schöppingen

![cool](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/86c57fbace799dd4eb1f1b8a2d3bdc1733f0aea1.png "cool")&nbsp;Michael Telgmann

---

<div class="post-metadata">

**Author:** ![sschreier](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/sschreier/32/23296_2.png) [@sschreier](https://forum.shopware.com/u/sschreier)\
**Post date:** [8. August 2016 um 08:59 UTC](https://forum.shopware.com/t/gelost-formular-store-in-plugin-konfiguration/38792/4 "2016-08-08T08:59:22Z")

</div>

> [@Michael Telgmann schrieb:](https://forum.shopware.com/profile/17553/Michael%20Telgmann "Michael%20Telgmann")
> 
> Hi Sebastian,
> 
> versuche mal statt base.Form folgendes zu nutzen: ‚Shopware.apps.Base.store.Form‘
> 
> Bist du unter 5.2 unterwegs? Neues oder „altes“ Plugin-System?
> 
> Viele Grüße aus Schöppingen
> 
> ![cool](http://forum.shopware.com/plugins/CKEditor/plugins/smiley/images/shopware.png "cool")&nbsp;Michael Telgmann

Hallo Michael,

danke für deine Antwort.

Das Plugin ist noch auf dem alten Plugin-System entwickelt, es soll aber sowohl unter als auch über Shopware Version 5.2 laufen.

Dein Vorschlag liefert sofort nach der Installation und bei jedem Aufruf der Plugin-Konfiguration eine Fehlermeldung:

```
GET http://link.de/backend/confi...Form?_dc=1470646552691&page=1&start=0&limit=1000
	
503 Service Unavailable

Ups! Ein Fehler ist aufgetreten!

    
        Die nachfolgenden Hinweise sollten Ihnen weiterhelfen
.
    

     in vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php on line 781

    Stack trace:
    
        #0 engine/Shopware/Controllers/Backend/Config.php(133): Doctrine\ORM\AbstractQuery->getOneOrNullResult
(2)
#1 engine/Library/Enlight/Controller/Action.php(159): Shopware_Controllers_Backend_Config->getFormAction
()
#2 engine/Library/Enlight/Controller/Dispatcher/Default.php(523): Enlight_Controller_Action->dispatch
('getFormAction')
#3 engine/Library/Enlight/Controller/Front.php(226): Enlight_Controller_Dispatcher_Default->dispatch
(Object(Enlight_Controller_Request_RequestHttp), Object(Enlight_Controller_Response_ResponseHttp))
#4 engine/Shopware/Kernel.php(176): Enlight_Controller_Front->dispatch()
#5 vendor/symfony/http-kernel/HttpCache/HttpCache.php(487): Shopware\Kernel->handle(Object(Symfony
\Component\HttpFoundation\Request), 1, true)
#6 engine/Shopware/Components/HttpCache/AppCache.php(255): Symfony\Component\HttpKernel\HttpCache\HttpCache-
>forward(Object(Symfony\Component\HttpFoundation\Request), true, NULL)
#7 vendor/symfony/http-kernel/HttpCache/HttpCache.php(258): Shopware\Components\HttpCache\AppCache-&gt
;forward(Object(Symfony\Component\HttpFoundation\Request), true)
#8 engine/Shopware/Components/HttpCache/AppCache.php(103): Symfony\Component\HttpKernel\HttpCache\HttpCache-
>pass(Object(Symfony\Component\HttpFoundation\Request), true)
#9 shopware.php(101): Shopware\Components\HttpCache\AppCache->handle(Object(Symfony\Component\HttpFoundation
\Request))
#10 {main}
    
 

$form->setElement('combo', 'my_field', 
     array(
          'label' => 'Formular',
          'description' => 'Legen Sie hier das Formular fest',
          'store' => 'Shopware.apps.Base.store.Form',
          'scope' => Shopware\Models\Config\Element::SCOPE_SHOP,
          'value' => '',
          'valueField' => 'id',
          'displayField' => 'name'
      )
);	

```

Beste Grüße

Sebastian

---

<div class="post-metadata">

**Author:** ![Michael\_Telgmann](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/michael_telgmann/32/20289_2.png) [@Michael\_Telgmann](https://forum.shopware.com/u/Michael_Telgmann)\
**Post date:** [8. August 2016 um 09:27 UTC](https://forum.shopware.com/t/gelost-formular-store-in-plugin-konfiguration/38792/5 "2016-08-08T09:27:24Z")

</div>

Hi Sebastian,

versuche mal den Typ ‘select’. Ansonsten würde ich erstmal die Konfiguration so minimal zu halten, wie möglich.&nbsp;

```
$form->setElement(
    'select',
    'my_field', 
    array(
        'label' => 'Formular',
        'store' => 'Shopware.apps.Base.store.Form'
    )
);

```

Wenn das dann ohne Probleme funktioniert, kannst du die Optionen nach und nach wiede dran hängen.

Viele Grüße aus Schöppingen

&nbsp;Michael Telgmann

---

<div class="post-metadata">

**Author:** ![sschreier](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/sschreier/32/23296_2.png) [@sschreier](https://forum.shopware.com/u/sschreier)\
**Post date:** [8. August 2016 um 09:37 UTC](https://forum.shopware.com/t/gelost-formular-store-in-plugin-konfiguration/38792/6 "2016-08-08T09:37:07Z")

</div>

> [@Michael Telgmann schrieb:](https://forum.shopware.com/profile/17553/Michael%20Telgmann "Michael%20Telgmann")
> 
> Hi Sebastian,
> 
> versuche mal den Typ ‚select‘. Ansonsten würde ich erstmal die Konfiguration so minimal zu halten, wie möglich.&nbsp;
> 
> $form-\>setElement(  
> ‚select‘,  
> ‚my\_field‘,  
> array(  
> ‚label‘ =\> ‚Formular‘,  
> ‚store‘ =\> ‚Shopware.apps.Base.store.Form‘  
> )  
> );
> 
> Wenn das dann ohne Probleme funktioniert, kannst du die Optionen nach und nach wiede dran hängen.
> 
> Viele Grüße aus Schöppingen
> 
> ![cool](http://forum.shopware.com/plugins/CKEditor/plugins/smiley/images/shopware.png "cool")&nbsp;Michael Telgmann

Hallo Michael,

leider das gleiche Resultat mit der gleichen Fehlermeldung.

Beste Grüße

Sebastian

---

<div class="post-metadata">

**Author:** ![Michael\_Telgmann](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/michael_telgmann/32/20289_2.png) [@Michael\_Telgmann](https://forum.shopware.com/u/Michael_Telgmann)\
**Post date:** [8. August 2016 um 11:45 UTC](https://forum.shopware.com/t/gelost-formular-store-in-plugin-konfiguration/38792/7 "2016-08-08T11:45:49Z")

</div>

Hi Sebastian,

scheinbar verursacht der Formular Store selbst das Problem. Konnte das bei mir nachstellen. Allerdings funktionieren andere Stores wie z.B.&nbsp;Shopware.apps.Base.store.Payment ohne Probleme. Könntest du dazu mal ein Ticket anlegen?&nbsp;[https://issues.shopware.com/](https://issues.shopware.com/)

Viele Grüße aus Schöppingen

![cool](http://forum.shopware.com/plugins/CKEditor/plugins/smiley/images/shopware.png "cool")&nbsp;Michael Telgmann

---

<div class="post-metadata">

**Author:** ![sschreier](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/sschreier/32/23296_2.png) [@sschreier](https://forum.shopware.com/u/sschreier)\
**Post date:** [8. August 2016 um 17:54 UTC](https://forum.shopware.com/t/gelost-formular-store-in-plugin-konfiguration/38792/8 "2016-08-08T17:54:57Z")

</div>

> [@Michael Telgmann schrieb:](https://forum.shopware.com/profile/17553/Michael%20Telgmann "Michael%20Telgmann")
> 
> Hi Sebastian,
> 
> scheinbar verursacht der Formular Store selbst das Problem. Konnte das bei mir nachstellen. Allerdings funktionieren andere Stores wie z.B.&nbsp;Shopware.apps.Base.store.Payment ohne Probleme. Könntest du dazu mal ein Ticket anlegen?&nbsp;[https://issues.shopware.com/](https://issues.shopware.com/)
> 
> Viele Grüße aus Schöppingen
> 
> ![cool](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/86c57fbace799dd4eb1f1b8a2d3bdc1733f0aea1.png "cool")&nbsp;Michael Telgmann

Hallo Michael,

ist erledigt: [Shopware Issuetracker](https://issues.shopware.com/#/issues/SW-15895) .

Beste Grüße

Sebastian
