# ExtJs Store erzeugt 404 im Backend. Warum??

**URL:** https://forum.shopware.com/t/extjs-store-erzeugt-404-im-backend-warum/57702
**Category:** Programmierung
**Created:** [26. Januar 2019 um 11:45 UTC](https://forum.shopware.com/t/extjs-store-erzeugt-404-im-backend-warum/57702 "2019-01-26T11:45:00Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![\_MikeB](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/_mikeb/32/7856_2.png) [@\_MikeB](https://forum.shopware.com/u/_MikeB)
#### Post date: [26. Januar 2019 um 11:45 UTC](https://forum.shopware.com/t/extjs-store-erzeugt-404-im-backend-warum/57702/1 "2019-01-26T11:45:00Z")

</div>

Hallo.

Für ein Kundenprojekt wollen/müssen wir das Custom Products Plugin um Abhängigkeiten zur Aussteuerung der Optionen erweitern. Hierfür habe ich bereits die Maske der Optionswerte um 2 Felder erweitert. Leider hänge ich nun beim Speichern der neuen Werte. Er findet meinen ExtJs Store nicht bzw. ich bekommen in der Console einen 404 für meinen Store angezeigt:  
/backend/bstExtendCustomProducts/store/Value?file=app&no-cache=1548501334+1+1

Folgende Fehlerbeschreibung:

```
Ext.define('Shopware.apps.Index', {
extend:'Enlight.app.SubApplication',
bulkLoad: true,
loadPath: '/backend/Index/load',
controllers:[
'Main',
'Widgets',
'ErrorReporter',
'ThemeCacheWarmUp'
],
requires: [
'Shopware.container.Viewport'
],
views: [
'Main',
'Menu',
'Footer',
'Search',
'widgets.Window',
'widgets.Sales',
'widgets.Upload',
'widgets.Visitors',
'widgets.Orders',
'widgets.Notice',
'widgets.Merchant',
'widgets.News',
'widgets.Base',
'merchant.Window',
'themeCache.ThemeCacheWarmUp',
'widgets.bi.Base'
],
models: [
'Widget',
'WidgetSettings',
'Turnover',
'Batch',
'Customers',
'Visitors',
'Orders',
'News',
'Merchant',
'MerchantMail',
'ThemeCacheWarmUp'
],
stores: [
'Widget',
'WidgetSettings',
'ThemeCacheWarmUp'
]
});

```

&nbsp;

Mein Store findet sich hier:&nbsp;custom\plugins\bstExtendCustomProducts\Resources\Views\backend\swag\_custom\_products\bst\_extend\_custom\_products\store\value.js

Hier mein ExtJS Sourcen:

custom\plugins\bstExtendCustomProducts\Resources\Views\backend\swag\_custom\_products\bst\_extend\_custom\_products\app.js

```
// {block name="backend/swag_custom_products/app"}
// {$smarty.block.parent}
// {include file="backend/swag_custom_products/bst_extend_custom_products/store/value.js"}
// {/block}

```

custom\plugins\bstExtendCustomProducts\Resources\Views\backend\swag\_custom\_products\bst\_extend\_custom\_products\view\values\window.js:

```
// {namespace name="backend/bst_extend_custom_products/value/window"}
//{block name="backend/swag_custom_products/value/window"}
//{$smarty.block.parent}
Ext.define('Shopware.apps.bstExtendCustomProducts.view.detail.Window', {
    override: 'Shopware.apps.SwagCustomProducts.view.values.Window',

    bstSnippets: {
        identifierFieldLabel: '{s name="fields/identifier/label"}Identifier{/s}',
        dependFieldLabel: '{s name="fields/depend/label"}Depend{/s}',
    },

    /**
     * @returns { *[] }
     */
    createItems: function () {
        var me = this,
            items = me.callParent(arguments);

        me.identifierField = me.createTextField('identifier', me.bstSnippets.identifierFieldLabel, true, false);
        me.identifierField.on('change', Ext.bind(me.onFieldChange, me));
        items.push(me.identifierField);
        me.dependField = me.createTextField('depend', me.bstSnippets.dependFieldLabel, true, false);
        me.dependField.on('change', Ext.bind(me.onFieldChange, me));
        items.push(me.dependField);

        return items;
    },

    /**
     * Event listener method which will be fired when the user clicks the "save" button.
     *
     * Validates the form. If it fails to validate, it marks the image picker, when used, otherwise it will save the record to the store.
     */
    saveButtonHandler: function () {
        var me = this;

        if (!me.formPanel.getForm().isValid()) {
            if (!me.useImagePicker) {
                return;
            }
            me.isImageSelectionInvalid();
            return;
        }

        if (!me.isRecordInStore(me.record, me.valueGrid.getStore())) {
            me.valueGrid.getStore().add(me.record);
        }

        var store = Ext.create('Shopware.apps.bstExtendCustomProducts.store.Value');
        store.getProxy().extraParams.valueId = me.record.get('id');

        me.destroy();
    }
});
//{/block}

```

custom\plugins\bstExtendCustomProducts\Resources\Views\backend\swag\_custom\_products\bst\_extend\_custom\_products\store\value.js

```
// {block name="backend/bst_extend_custom_products/store/value"}
Ext.define('Shopware.apps.bstExtendCustomProducts.store.Value', {
    /**
     * extends from the standard ExtJs store class
     */
    extend: 'Shopware.store.Listing',

    /**
     * the model which belongs to the store
     */
    model: 'Shopware.apps.bstExtendCustomProducts.model.Value',

    configure: function () {
        return {
            controller: 'BstExtendCustomProducts'
        };
    }
});
// {/block}

```

custom\plugins\bstExtendCustomProducts\Resources\Views\backend\swag\_custom\_products\bst\_extend\_custom\_products\model\value.js

```
// {block name="backend/bst_extend_custom_products/model/value"}
Ext.define('Shopware.apps.bstExtendCustomProducts.model.Value', {
    extend: 'Ext.data.Model',

    fields: [
        { name: 'identifier', type: 'string', defaultValue: null, useNull: true },
        { name: 'depend', type: 'string', defaultValue: null, useNull: true }
    ]
});
// {/block}

```

&nbsp;

Wiso dieser 404er? Was übersehe ich bzw. was mach ich falsch? Ich danke euch schon mal im Voraus 😉

&nbsp;

Beste Grüße  
Mike

---

<div class="post-metadata">

### Author: ![\_MikeB](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/_mikeb/32/7856_2.png) [@\_MikeB](https://forum.shopware.com/u/_MikeB)
#### Post date: [4. Februar 2019 um 12:34 UTC](https://forum.shopware.com/t/extjs-store-erzeugt-404-im-backend-warum/57702/2 "2019-02-04T12:34:55Z")

</div>

Kann mir keinen den entscheideten Tipp geben? ☹

---

<div class="post-metadata">

### Author: ![shyim](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/shyim/32/7681_2.png) [@shyim](https://forum.shopware.com/u/shyim)
#### Post date: [6. Februar 2019 um 11:18 UTC](https://forum.shopware.com/t/extjs-store-erzeugt-404-im-backend-warum/57702/3 "2019-02-06T11:18:08Z")

</div>

Hast du mal geschaut ob deine app.js wirklich geladen wurden?

---

<div class="post-metadata">

### Author: ![\_MikeB](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/_mikeb/32/7856_2.png) [@\_MikeB](https://forum.shopware.com/u/_MikeB)
#### Post date: [6. Februar 2019 um 11:23 UTC](https://forum.shopware.com/t/extjs-store-erzeugt-404-im-backend-warum/57702/4 "2019-02-06T11:23:14Z")

</div>

@Shyim‍ Danke für Dein Feedback? Wie kann ich das prüfen? Console.log unterbringen? Wird die app.js nicht automatisch erkannt sobald sie vorliegt?

---

<div class="post-metadata">

### Author: ![shyim](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/shyim/32/7681_2.png) [@shyim](https://forum.shopware.com/u/shyim)
#### Post date: [6. Februar 2019 um 13:32 UTC](https://forum.shopware.com/t/extjs-store-erzeugt-404-im-backend-warum/57702/5 "2019-02-06T13:32:19Z")

</div>

Alles was du im Backend erweiterst muss mit extendsTemplate gemacht werden. Du kannst im Network Tab sehen was es ausgibt
