# Plugin kann nicht installiert werden

**URL:** <https://forum.shopware.com/t/plugin-kann-nicht-installiert-werden/59220>\
**Category:** Programmierung\
**Created:** [24. April 2019 um 13:26 UTC](https://forum.shopware.com/t/plugin-kann-nicht-installiert-werden/59220 "2019-04-24T13:26:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kadis](https://avatars.discourse-cdn.com/v4/letter/k/c57346/32.png) [@kadis](https://forum.shopware.com/u/kadis)\
**Post date:** [24. April 2019 um 13:26 UTC](https://forum.shopware.com/t/plugin-kann-nicht-installiert-werden/59220/1 "2019-04-24T13:26:18Z")

</div>

Hallo,&nbsp;

Ich kann ein selbst programmiertes Plugin nicht installieren.

Auf andere Shops funktioniert das ohne Problem.&nbsp;

&nbsp;

Fehlermeldung:

```
Fatal error: Uncaught Error: Class 'Shopware_Components_Form' not found in /var/www/vhosts/ *********.de/httpdocs/engine/Shopware/Plugins/Local/Backend/PLUGINName/install_modules/forms_addon_00_standard.php:16 Stack trace: #0 /var/www/vhosts/*********.de/httpdocs/engine/Shopware/Plugins/Local/Backend/PLUGINName/Bootstrap.php(50): include_once() #1 /var/www/vhosts/*********.de/httpdocs/engine/Shopware/Components/Plugin/Namespace.php(252): Shopware_Plugins_Backend_PLUGINName_Bootstrap->install() #2 /var/www/vhosts/*********.de/httpdocs/engine/Shopware/Bundle/PluginInstallerBundle/Service/LegacyPluginInstaller.php(99): Shopware_Components_Plugin_Namespace->installPlugin(Object(Shopware_Plugins_Backend_PLUGINName_Bootstrap)) #3 /var/www/vhosts/*********.de/httpdocs/engine/Shopware/Bundle/PluginInstallerBundle/Service/InstallerService.php(177): Shopware\Bundle\PluginInstallerBundle\Service\LegacyPluginInstaller->installPlugin(Object(Shopware\Models\Plugin\Plugin)) #4 /var/www/vhosts/*********.de/httpdo in /var/www/vhosts/ *********.de/httpdocs/engine/Shopware/Plugins/Local/Backend/PLUGINName/install_modules/forms_addon_00_standard.php on line 16

```

In&nbsp;forms\_addon\_00\_standard.php stehen alle Konfigurationen so:

$form-\>setElement(‘text’, ‘RegenerateOrders’ , array(  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;‘scope’=\>Shopware\_Components\_Form::SCOPE\_SHOP,  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;‘description’ =\> ‘Tragen Sie hier Shopbestellnummern ein, die erneut generiert werden sollen. (Bei mehreren, Komma separiert.)’,  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;‘label’=\>‘Bestellungen die neu generiert werden sollen:’,  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;‘value’=\>’’,  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;));

&nbsp;

PHP: 7.2

Shopware 5.5.7

&nbsp;

Das Plugin hat schon funktioniert, bis ich das heute deinstalliert habe und seitdem kann ich das Plugin nicht mehr installieren.

---

<div class="post-metadata">

**Author:** ![ahmadsaad](https://avatars.discourse-cdn.com/v4/letter/a/65b543/32.png) [@ahmadsaad](https://forum.shopware.com/u/ahmadsaad)\
**Post date:** [24. April 2019 um 13:41 UTC](https://forum.shopware.com/t/plugin-kann-nicht-installiert-werden/59220/2 "2019-04-24T13:41:25Z")

</div>

Hallo @kadis‍,

Shopware\_Components\_Form ist deprecated und nicht mehr exisitiert.

benutzen Sie ‚Shopware\Models\Config\Element‘&nbsp;

VG,

Tel.: +49 755&nbsp;- 183 990 00 | Mail: [info@enbit.de](mailto:info@enbit.de) | Web:&nbsp;[http://enbit.de/](http://enbit.de/)

---

<div class="post-metadata">

**Author:** ![kadis](https://avatars.discourse-cdn.com/v4/letter/k/c57346/32.png) [@kadis](https://forum.shopware.com/u/kadis)\
**Post date:** [24. April 2019 um 13:47 UTC](https://forum.shopware.com/t/plugin-kann-nicht-installiert-werden/59220/3 "2019-04-24T13:47:14Z")

</div>

Vielen Dank.&nbsp;

Hat sich auch&nbsp;$form-\>save(); Befehl geändert?&nbsp;

Weil jetzt bekomme ich&nbsp;Call to undefined method Shopware\Models\Config\Form::save()&nbsp;

&nbsp;

Mein Befehl:&nbsp;

$form = $this-\>Form();  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;//Backend Einstellungen laden  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;$install\_forms = glob(\_\_DIR\_\_. ‘/install\_modules/forms\_\*.php’);  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;if (count($install\_forms) \> 0) {  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;foreach ($install\_forms as $form\_file) {  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;include\_once($form\_file);  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;}  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;}  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;//  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;$form-\>save();

---

<div class="post-metadata">

**Author:** ![ahmadsaad](https://avatars.discourse-cdn.com/v4/letter/a/65b543/32.png) [@ahmadsaad](https://forum.shopware.com/u/ahmadsaad)\
**Post date:** [24. April 2019 um 13:56 UTC](https://forum.shopware.com/t/plugin-kann-nicht-installiert-werden/59220/4 "2019-04-24T13:56:04Z")

</div>

ich weiß nicht genau, aber ich glaube du brauchst diese Methode nicht mehr
