Backend Plugin - js-ERROR bei Action Rückgabe / Debugging

In meinem Plugin habe ich ein Formular, das bei klick auf einen Button abgesendet werden soll: /\* ... \*/ xtype: 'button', text: 'Aktualisieren', style: 'margin:0 5px 0 0;', handler: function(){ Ext.getCmp('groups-form-'+shopID).getForm().submit({ url: '{url action=updateGroup}', scope: this, success: function(ret){ console.log(ret); }, error: function(form, action) { /\* ... \*/ } }); /\* ... \*/ der PHP-Code der Methode im Action-Controller: public function updateGroupAction() { $this-\>View()-\>setTemplate(); echo "foobar"; } Wenn der Button gedrückt wird, ist der Request korrekt aber die Rückgabe (echo) erzeugt folgenden js-Fehler: [quote]Uncaught ReferenceError: foobar is not defined (anonymous function) doDecode ext-all-debug.js:11527 (anonymous function) ext-all-debug.js:11649 Ext.extend.handleResponse ext-all-debug.js:59055 Ext.form.Action.processResponse ext-all-debug.js:58876 Ext.extend.success ext-all-debug.js:59024 handleResponse ext-all-debug.js:8550 f ext-base.js:7 (anonymous function) ext-base.js:7[/quote] Wieso wird die Rückgabe nochmal debuggt und versucht als Funktion auszuführen? Ich habe schon ein paar andere Plugins nach dem selben Muster erstellt, wo das Problem nicht auftaucht, deshalb bin ich Momentan etwas ratlos. 2. Frage: Gibt es eine Möglichkeit, das PHP Debugging mit Google Chrome durchzuführen?

ich verstehe das nicht. Auch wenn ich debuggen will, kommt ein Fehler: public function updateGroupAction() { $this-\>View()-\>setTemplate(); Shopware()-\>Log()-\>log("foobar"); } [quote]POST http://host.de/shop/backend/PCKonfigura … pdateGroup 503 (Service Unavailable) ext-base.js:7[/quote] Response: [quote]Ups! Ein Fehler ist aufgetreten! Die nachfolgenden Hinweise sollten Ihnen weiterhelfen. Bad log priority in Vendor/Zend/library/Zend/Log.php on line 347 Stack trace: #0 Shopware/Plugins/Local/Frontend/PCKonfigurator/PCKonfiguratorAdmin.php(53): Zend_Log->log(‘foobar’) #1 Enlight/Controller/Action.php(70): Shopware_Controllers_Backend_PCKonfiguratorAdmin->updateGroupAction() #2 Enlight/Controller/Dispatcher/DispatcherDefault.php(329): Enlight_Controller_Action->dispatch(‘updateGroupActi…’) #3 Enlight/Controller/Front.php(99): Enlight_Controller_Dispatcher_DispatcherDefault->dispatch(Object(Enlight_Controller_Request_RequestHttp), Object(Enlight_Controller_Response_ResponseHttp)) #4 Shopware/Bootstrap.php(33): Enlight_Controller_Front->dispatch() #5 Enlight/Application.php(86): Shopware_Bootstrap->run() #6 shopware.php(6): Enlight_Application->run() #7 {main}[/quote]

Da fehlt doch der zweite Parameter beim Aufruf? Shopware()-\>Log()-\>log($VARIABLE ,Zend\_Log::INFO);

Die Rückgabe ist verkehrt - der wartet folgende Rückgabe echo json_encode(array(“success”=>true)); Wenn success = false ist, springt der in den Failure-Block clientseitig.

Achsooo, das ist vordefiniert. Jetzt ist alles klar :slight_smile: