# Shopware - Extjs - Can not send valid Ajax request from plugin config window

**URL:** <https://forum.shopware.com/t/shopware-extjs-can-not-send-valid-ajax-request-from-plugin-config-window/55825>\
**Category:** Shopware 5\
**Created:** [18. Oktober 2018 um 11:39 UTC](https://forum.shopware.com/t/shopware-extjs-can-not-send-valid-ajax-request-from-plugin-config-window/55825 "2018-10-18T11:39:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zeljko](https://avatars.discourse-cdn.com/v4/letter/z/7ab992/32.png) [@zeljko](https://forum.shopware.com/u/zeljko)\
**Post date:** [18. Oktober 2018 um 11:39 UTC](https://forum.shopware.com/t/shopware-extjs-can-not-send-valid-ajax-request-from-plugin-config-window/55825/1 "2018-10-18T11:39:45Z")

</div>

Hi!

Shopware backend extjs question. Shopware 5.4.6 version

I have task to implement button on plugin config window which will send request on backend controller. So I implemented button and wrote code to execute ajax:

```
            Connect
            Verbinde
            Connect

```

And when I click to button I get status 500 with message in apache log:

Call to undefined method Shopware\_Proxies\_ShopwareControllersBackendEtsyUserDataProxy::setFront()

So, is there proper way to write this request or I misunderstood something? Or it is a bug?

---

<div class="post-metadata">

**Author:** ![essa.anid](https://avatars.discourse-cdn.com/v4/letter/e/3ec8ea/32.png) [@essa.anid](https://forum.shopware.com/u/essa.anid)\
**Post date:** [19. Januar 2022 um 15:48 UTC](https://forum.shopware.com/t/shopware-extjs-can-not-send-valid-ajax-request-from-plugin-config-window/55825/2 "2022-01-19T15:48:40Z")

</div>

**Controllers** Folder is reserved for the old controller system. Just name your folder to **„Controller“** or move this controller to new „controller“ folder and it will work

---

<div class="post-metadata">

**Author:** ![essa.anid](https://avatars.discourse-cdn.com/v4/letter/e/3ec8ea/32.png) [@essa.anid](https://forum.shopware.com/u/essa.anid)\
**Post date:** [19. Januar 2022 um 15:53 UTC](https://forum.shopware.com/t/shopware-extjs-can-not-send-valid-ajax-request-from-plugin-config-window/55825/3 "2022-01-19T15:53:56Z")

</div>

namespace PluginName\Controller\Backend;

class YourController extends \Shopware\_Controllers\_Backend\_ExtJs  
{  
public function testAction()  
{}  
}

and in your config.xml

```
        <name>buttonTest</name>

        <label lang="de">xxxxx</label>

        <label lang="en">xxxxx</label>

        <options>

            <handler>

                <![CDATA[

                function() {

                  Ext.Ajax.request({

                    url: 'YourController/test',

                    success: function (response) {
                    },
                    failure: function (response) {
                    }

                  });

                }

                ]]>

            </handler>

        </options>

    </element>
```
