# Redirect auf Error

**URL:** <https://forum.shopware.com/t/redirect-auf-error/87480>\
**Category:** Programmierung\
**Tags:** programming\
**Created:** [7. Mai 2021 um 09:26 UTC](https://forum.shopware.com/t/redirect-auf-error/87480 "2021-05-07T09:26:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AndreasBielmeier](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@AndreasBielmeier](https://forum.shopware.com/u/AndreasBielmeier)\
**Post date:** [7. Mai 2021 um 09:26 UTC](https://forum.shopware.com/t/redirect-auf-error/87480/1 "2021-05-07T09:26:08Z")

</div>

Hallo zusammen,  
ich habe zur Probleme mit einem Plugin (Payone). Beim Debuggen fällt mir auf, dass folgende Anweisung

```
$this->redirect(array('controller' => 'index', 'action' => 'error'));

```

zu folgendem Fehler führt:

> **Fatal error** : Uncaught Enlight\_Controller\_Exception: Action „Frontend\_Index\_errorAction“ not found failure for request url [https://www.entdeckerpass.com/entdeckerpass/stage/de/index/error](https://www.entdeckerpass.com/entdeckerpass/stage/de/index/error) in /var/www/html/entdeckerpass\_test/engine/Library/Enlight/Controller/Action.php:124 Stack trace: #0 /var/www/html/entdeckerpass\_test/engine/Library/Enlight/Controller/Action.php(192): Enlight\_Controller\_Action-\>\_\_call(‚errorAction‘, Array) #1 /var/www/html/entdeckerpass\_test/engine/Library/Enlight/Controller/Dispatcher/Default.php(478): Enlight\_Controller\_Action-\>dispatch(‚errorAction‘) #2 /var/www/html/entdeckerpass\_test/engine/Library/Enlight/Controller/Front.php(228): Enlight\_Controller\_Dispatcher\_Default-\>dispatch(Object(Enlight\_Controller\_Request\_RequestHttp), Object(Enlight\_Controller\_Response\_ResponseHttp)) #3 /var/www/html/entdeckerpass\_test/engine/Shopware/Kernel.php(188): Enlight\_Controller\_Front-\>dispatch() #4 /var/www/html/entdeckerpass\_test/vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php(102): Shopware\Kernel-\>han in **/var/www/html/entdeckerpass\_test/engine/Library/Enlight/Controller/Action.php** on line **124**

---

<div class="post-metadata">

**Author:** ![R4M](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/r4m/32/9983_2.png) [@R4M](https://forum.shopware.com/u/R4M)\
**Post date:** [7. Mai 2021 um 14:11 UTC](https://forum.shopware.com/t/redirect-auf-error/87480/2 "2021-05-07T14:11:07Z")

</div>

Soll heißen, im Index-Controller gibt es keine Action mit „error“. Das gibt es im Error-Controller und in anderen Controllern.

---

<div class="post-metadata">

**Author:** ![AndreasBielmeier](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@AndreasBielmeier](https://forum.shopware.com/u/AndreasBielmeier)\
**Post date:** [8. Mai 2021 um 15:17 UTC](https://forum.shopware.com/t/redirect-auf-error/87480/3 "2021-05-08T15:17:24Z")

</div>

Super, danke. Der korrekte Redirect heißt dann:  
`$this->redirect(array('controller' => 'error', 'action' => 'error'));`  
Werde das dann mal Payone berichten, weil das funktioniert so nicht.  
Übrigens, habe Shopware 5.6.9 im Einsatz, hatte ich bisher nicht geschrieben.
