# Einkaufswelten Plugin für eigene Elemente

**URL:** https://forum.shopware.com/t/einkaufswelten-plugin-fur-eigene-elemente/51694
**Category:** Programmierung
**Created:** [12. März 2018 um 11:34 UTC](https://forum.shopware.com/t/einkaufswelten-plugin-fur-eigene-elemente/51694 "2018-03-12T11:34:01Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![pm\_leon](https://avatars.discourse-cdn.com/v4/letter/p/a88e57/32.png) [@pm\_leon](https://forum.shopware.com/u/pm_leon)
#### Post date: [12. März 2018 um 11:34 UTC](https://forum.shopware.com/t/einkaufswelten-plugin-fur-eigene-elemente/51694/1 "2018-03-12T11:34:01Z")

</div>

Shopware Version 5.3.7

Moin moin,

ich bin gerade dabei ein Plugin für eigene Einkaufsweltelemente zu erstellen.

Ich bekomme einen JS Fehler im Inspector:&nbsp;Cannot read property ‚substring‘ of undefined wenn man das Element bearbeiten möchte.

Mein Plugin funktioniert einwandfrei auf der Version 5.2

Ich habe die Vermutung das es an der Namensgebung der Plugindateien liegt. Bindestriche u.s.w werden anders konvertiert.

Ich habe schon andere Einträge in Foren gesehen die das gleiche Problem haben, doch dazu keine Lösung hatten.

Vielleicht kennt sich jemand mit der aktuellen Lage in Shopware 5.3 und Einkaufsweltelementen&nbsp;aus.

LG Leon

---

<div class="post-metadata">

### Author: ![derwunner](https://avatars.discourse-cdn.com/v4/letter/d/e5b9ba/32.png) [@derwunner](https://forum.shopware.com/u/derwunner)
#### Post date: [12. März 2018 um 12:03 UTC](https://forum.shopware.com/t/einkaufswelten-plugin-fur-eigene-elemente/51694/2 "2018-03-12T12:03:01Z")

</div>

Hallo,

&nbsp;

diese Fehler hängen meistens mit den ExtJS Namespace der Komponenten zusammen. Bitte prüfe doch mal die Namespaces, ob die alle exakt so passen. Und prüfe auch mal, ob der Fehler ebenfalls unter 5.2 kommt.

Ein wenig&nbsp;mehr Infos wären schon nötig… Welche Variable ist undefined, was ist undefined usw.?

&nbsp;

&nbsp;

MFG

&nbsp;

derwunner

---

<div class="post-metadata">

### Author: ![pm\_leon](https://avatars.discourse-cdn.com/v4/letter/p/a88e57/32.png) [@pm\_leon](https://forum.shopware.com/u/pm_leon)
#### Post date: [12. März 2018 um 12:07 UTC](https://forum.shopware.com/t/einkaufswelten-plugin-fur-eigene-elemente/51694/3 "2018-03-12T12:07:07Z")

</div>

Moin,

so sieht der Fehler aus.

Uncaught TypeError: Cannot read property ‚substring‘ of undefined  
&nbsp; &nbsp; at Object.parseNamespace (ext-all-debug.js?201801171346:4496)  
&nbsp; &nbsp; at Object.get (ext-all-debug.js?201801171346:4608)  
&nbsp; &nbsp; at Object.instantiate (ext-all-debug.js?201801171346:4846)  
&nbsp; &nbsp; at Object.instantiateByAlias (ext-all-debug.js?201801171346:4828)  
&nbsp; &nbsp; at Object.widget (ext-all-debug.js?201801171346:5105)  
&nbsp; &nbsp; at constructor.create (ext-all-debug.js?201801171346:44914)  
&nbsp; &nbsp; at constructor.lookupComponent (ext-all-debug.js?201801171346:75488)  
&nbsp; &nbsp; at constructor.prepareItems (ext-all-debug.js?201801171346:75460)  
&nbsp; &nbsp; at constructor.add (ext-all-debug.js?201801171346:75511)  
&nbsp; &nbsp; at constructor.initItems (ext-all-debug.js?201801171346:75355)

&nbsp;

Eine weitere Quelle:&nbsp;[https://forum.shopware.com/discussion/32943/plugin-einkaufswelt-element-mit-eigener-extjs-komponente](https://forum.shopware.com/discussion/32943/plugin-einkaufswelt-element-mit-eigener-extjs-komponente)

> **[createEmotionComponent() im neuen Plugin-System](https://forum.shopware.com/discussion/42461/createemotioncomponent-im-neuen-plugin-system)**
>
> hi, ich wollte mir gerade ein kleines Plugin für ein eigenes Einkaufswelten-Element schreiben. Das wollte ich dann auch gleich im neuen Plugin-System machen. Leider musste ich ziemlich schnell feststellen, dass es die...

---

<div class="post-metadata">

### Author: ![derwunner](https://avatars.discourse-cdn.com/v4/letter/d/e5b9ba/32.png) [@derwunner](https://forum.shopware.com/u/derwunner)
#### Post date: [13. März 2018 um 08:27 UTC](https://forum.shopware.com/t/einkaufswelten-plugin-fur-eigene-elemente/51694/4 "2018-03-13T08:27:31Z")

</div>

> [@pm\_leon schrieb:](https://forum.shopware.com/profile/26540/pm_leon "pm\_leon")
> 
> Moin,
> 
> so sieht der Fehler aus.
> 
> Uncaught TypeError: Cannot read property ‚substring‘ of undefined  
> &nbsp; &nbsp; at Object.parseNamespace (ext-all-debug.js?201801171346:4496)  
> &nbsp; &nbsp; at Object.get (ext-all-debug.js?201801171346:4608)  
> &nbsp; &nbsp; at Object.instantiate (ext-all-debug.js?201801171346:4846)  
> &nbsp; &nbsp; at Object.instantiateByAlias (ext-all-debug.js?201801171346:4828)  
> &nbsp; &nbsp; at Object.widget (ext-all-debug.js?201801171346:5105)  
> &nbsp; &nbsp; at constructor.create (ext-all-debug.js?201801171346:44914)  
> &nbsp; &nbsp; at constructor.lookupComponent (ext-all-debug.js?201801171346:75488)  
> &nbsp; &nbsp; at constructor.prepareItems (ext-all-debug.js?201801171346:75460)  
> &nbsp; &nbsp; at constructor.add (ext-all-debug.js?201801171346:75511)  
> &nbsp; &nbsp; at constructor.initItems (ext-all-debug.js?201801171346:75355)&nbsp;

Ja, wie ich es eingangs schon vermutet hatte: Deine Namespaces stimmen nicht. ExtjS ist bei sowas leider so allgemein, dass man nicht sagen kann, um welche Komponente es sich explizit handelt. Da du aber gerade dabei bist deine eigene zu entwickeln, liegt der Verdacht nahe, dass es an dieser liegt. Prüfe doch bitte mal in deinem Plugin alle Namespaces, sowie vergebene aliase und&nbsp;verwendete (= erweiterte) aliase.

Der Fehlermeldung entnehme ich, dass es wohl irgendwo schon beim Initialisieren der Klasse passieren muss. Also ist etwas generell falsch.
