# core.ERROR: exception The provided CSRF-Token is invalid

**URL:** <https://forum.shopware.com/t/core-error-exception-the-provided-csrf-token-is-invalid/40112>\
**Category:** Allgemein\
**Created:** [26. September 2016 um 11:27 UTC](https://forum.shopware.com/t/core-error-exception-the-provided-csrf-token-is-invalid/40112 "2016-09-26T11:27:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kweb](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@kweb](https://forum.shopware.com/u/kweb)\
**Post date:** [26. September 2016 um 11:27 UTC](https://forum.shopware.com/t/core-error-exception-the-provided-csrf-token-is-invalid/40112/1 "2016-09-26T11:27:19Z")

</div>

Hallo Gemeinde,

seit einiger Zeit ist die Anzahl an Bestellabbrüchen bei uns ziemlich angestiegen. In der Error Log habe ich immer wieder folgende Meldung drin:

```
core.ERROR: exception 'Shopware\Components\CSRFTokenValidationException' with message 'The provided CSRF-Token is invalid. If you're sure that the request should be valid, the called controller action needs to be whitelisted using the CSRFWhitelistAware interface.' in /www/htdocs/xxx/sw511/backup/backup/engine/Shopware/Components/CSRFTokenValidator.php:118 Stack trace: #0 [internal function]: Shopware\Components\CSRFTokenValidator->checkBackendTokenValidation(Object(Enlight_Controller_ActionEventArgs)) #1 /www/htdocs/xxx/sw511/backup/backup/engine/Library/Enlight/Event/Handler/Default.php(91): call_user_func(Array, Object(Enlight_Controller_ActionEventArgs)) #2 /www/htdocs/xxx/sw511/backup/backup/engine/Library/Enlight/Event/EventManager.php(214): Enlight_Event_Handler_Default->execute(Object(Enlight_Controller_ActionEventArgs)) #3 /www/htdocs/xxx/sw511/backup/backup/engine/Library/Enlight/Controller/Action.php(143): Enlight_Event_EventManager->notify('Enlight_Control...', Object(Enlight_Controller_ActionEventArgs)) #4 /www/htdocs/xxx/sw511/backup/backup/engine/Library/Enlight/Controller/Dispatcher/Default.php(523): Enlight_Controller_Action->dispatch('indexAction') #5 /www/htdocs/xxx/sw511/backup/backup/engine/Library/Enlight/Controller/Front.php(223): Enlight_Controller_Dispatcher_Default->dispatch(Object(Enlight_Controller_Request_RequestHttp), Object(Enlight_Controller_Response_ResponseHttp)) #6 /www/htdocs/xxx/sw511/backup/backup/engine/Shopware/Kernel.php(176): Enlight_Controller_Front->dispatch() #7 /www/htdocs/xxx/sw511/backup/backup/vendor/symfony/http-kernel/HttpCache/HttpCache.php(487): Shopware\Kernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #8 /www/htdocs/xxx/sw511/backup/backup/engine/Shopware/Components/HttpCache/AppCache.php(255): Symfony\Component\HttpKernel\HttpCache\HttpCache->forward(Object(Symfony\Component\HttpFoundation\Request), true, NULL) #9 /www/htdocs/xxx/sw511/backup/backup/vendor/symfony/http-kernel/HttpCache/HttpCache.php(258): Shopware\Components\HttpCache\AppCache->forward(Object(Symfony\Component\HttpFoundation\Request), true) #10 /www/htdocs/xxx/sw511/backup/backup/engine/Shopware/Components/HttpCache/AppCache.php(103): Symfony\Component\HttpKernel\HttpCache\HttpCache->pass(Object(Symfony\Component\HttpFoundation\Request), true) #11 /www/htdocs/xxx/sw511/backup/backup/shopware.php(101): Shopware\Components\HttpCache\AppCache->handle(Object(Symfony\Component\HttpFoundation\Request)) #12 {main} [] {"uid":"fe32682"}

```

Wir haben den Eindruck die Bestellabbrüche liegen an dieser Meldung. Im Forum habe ich mich schon durchgelesen, dort wie vermutet, dass es mit einer überschrieben index.tpl in

/themes/Frontend/template/frontend/index

liegen könnte. Für ein paar Anpassungen habe ich die index.tpl folgend überschrieben:

```
{extends file="parent:/frontend/index/index.tpl"}
{block name="frontend_index_footer"}

                                
                                      
                                        
                                          Unsere Zahlungsmöglichkeiten
                                          
                                          
                                          
                                          
                                          
                                          
                                          
                                          
                                        

                                        
                                        Versand & Info
                                          
                                          
                                        

                                         
                                        Social Media
                                          
                                        
                                       
                                        {block name="frontend_index_footer_container"}
                                                {include file='frontend/index/footer.tpl'}
                                        {/block}
                                
                        
                       {/block}

```

Habe ich da etwas falsch gemacht, dass dieser Fehler auftritt? Ich habe noch nicht so recht verstanden was genau den Fehler verursacht und woran es liegt.

Beste Grüße,

kweb

---

<div class="post-metadata">

**Author:** ![nicole86](https://avatars.discourse-cdn.com/v4/letter/n/a698b9/32.png) [@nicole86](https://forum.shopware.com/u/nicole86)\
**Post date:** [27. September 2016 um 05:19 UTC](https://forum.shopware.com/t/core-error-exception-the-provided-csrf-token-is-invalid/40112/2 "2016-09-27T05:19:47Z")

</div>

Die CSRF-Protection verursacht viele Fehler derart. Am besten schaltet man diese aus bis die stabil läuft

---

<div class="post-metadata">

**Author:** ![hobbitsoft](https://avatars.discourse-cdn.com/v4/letter/h/a698b9/32.png) [@hobbitsoft](https://forum.shopware.com/u/hobbitsoft)\
**Post date:** [13. Oktober 2016 um 17:52 UTC](https://forum.shopware.com/t/core-error-exception-the-provided-csrf-token-is-invalid/40112/3 "2016-10-13T17:52:06Z")

</div>

Hallo,

wir haben auch das Problem. Die Deaktvierung soll in die config.php

Frage: Ist es die config.php im Hauptverzeichnis? Dort wo host, port etc. stehen?

Dort sollte

```
**`'csrfProtection' => [
    'frontend' => false,
    'backend' => false
],`**

```

`eingefügt werden? `

&nbsp;

`Vielen Dank für eine kurze Info. Wir sind Verkäufer und keine Programmierer. Sehr ärgerlich, dass man sich mit solchen Updates ständig das System versemmelt...`

`Liebe Grüße`

`Charlotte`

---

<div class="post-metadata">

**Author:** ![ellwe](https://avatars.discourse-cdn.com/v4/letter/e/e36b37/32.png) [@ellwe](https://forum.shopware.com/u/ellwe)\
**Post date:** [14. Oktober 2016 um 07:22 UTC](https://forum.shopware.com/t/core-error-exception-the-provided-csrf-token-is-invalid/40112/4 "2016-10-14T07:22:20Z")

</div>

Dann solltet ihr einen Programmierer bezahlen/anstellen. Man kann nicht erwarten, dass immer alles glatt läuft. Vor allem habt ihr ja offensichtlich in den Templates gearbeitet, sonst wäre die Änderung durch ein Update reingekommen.

[https://forum.shopware.com/discussion/38877/neuinstallation-auf-5-2-1-x-csrf-token-is-invalid](https://forum.shopware.com/discussion/38877/neuinstallation-auf-5-2-1-x-csrf-token-is-invalid)
