# Custom Products v2: Problem mit CSRF Validation

**URL:** <https://forum.shopware.com/t/custom-products-v2-problem-mit-csrf-validation/40537>\
**Category:** Plugins\
**Tags:** offizielle-shopware-\
**Created:** [14. Oktober 2016 um 09:09 UTC](https://forum.shopware.com/t/custom-products-v2-problem-mit-csrf-validation/40537 "2016-10-14T09:09:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![bholbein](https://avatars.discourse-cdn.com/v4/letter/b/67e7ee/32.png) [@bholbein](https://forum.shopware.com/u/bholbein)\
**Post date:** [14. Oktober 2016 um 09:09 UTC](https://forum.shopware.com/t/custom-products-v2-problem-mit-csrf-validation/40537/1 "2016-10-14T09:09:43Z")

</div>

Hallo zusammen,

ich bekomme seit einiger Zeit häufiger Fehlermeldungen im Shop die mit der CSRF Validation und Custom Products in Zusammenhang stehen.

Der Fehler kann leider nicht zuverlässig reproduziert werden, trifft aber ca. 10-15 mal am Tag auf. Er resultiert darin, dass das Produkt nicht in den Warenkorb gelegt werden kann, ohne vorher die Seite neuzuladen.&nbsp;

Shopware Version: 5.2.6  
Custom Products Version: 1.0.6  
Andere Plugins: Paypal 3.4.2, Amazon Payments 2.0.3, Trusted Shops Badge 1.0.1&nbsp;(alle Plugins sind kompatibel)

Ich habe in einem anderen Thread gelesen, dass Paypal wohl Probleme mit der CSRF Validation macht, was auch zu sporadischen Problemen beim Login und Registrieren führt. Amazon Payments hat ein Problem im letzten Update behoben.

Freue mich auf jede Idee für die Lösung des Problems.

Fehlermeldung:

```
Message:	
exception 'Shopware\Components\CSRFTokenValidationException' with message 'The provided X-CSRF-Token is invalid. Please go back, reload the page and try again.' in /home/glitzer2/public_html/engine/Shopware/Components/CSRFTokenValidator.php:161
Stack trace:
#0 [internal function]: Shopware\Components\CSRFTokenValidator->checkFrontendTokenValidation(Object(Enlight_Controller_ActionEventArgs))
#1 /home/glitzer2/public_html/engine/Library/Enlight/Event/Handler/Default.php(91): call_user_func(Array, Object(Enlight_Controller_ActionEventArgs))
#2 /home/glitzer2/public_html/engine/Library/Enlight/Event/EventManager.php(214): Enlight_Event_Handler_Default->execute(Object(Enlight_Controller_ActionEventArgs))
#3 /home/glitzer2/public_html/engine/Library/Enlight/Controller/Action.php(143): Enlight_Event_EventManager->notify('Enlight_Control...', Object(Enlight_Controller_ActionEventArgs))
#4 /home/glitzer2/public_html/engine/Library/Enlight/Controller/Dispatcher/Default.php(523): Enlight_Controller_Action->dispatch('saveConfigurati...')
#5 /home/glitzer2/public_html/engine/Library/Enlight/Controller/Front.php(223): Enlight_Controller_Dispatcher_Default->dispatch(Object(Enlight_Controller_Request_RequestHttp), Object(Enlight_Controller_Response_ResponseHttp))
#6 /home/glitzer2/public_html/engine/Shopware/Kernel.php(176): Enlight_Controller_Front->dispatch()
#7 /home/glitzer2/public_html/vendor/symfony/http-kernel/HttpCache/HttpCache.php(487): Shopware\Kernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#8 /home/glitzer2/public_html/engine/Shopware/Components/HttpCache/AppCache.php(255): Symfony\Component\HttpKernel\HttpCache\HttpCache->forward(Object(Symfony\Component\HttpFoundation\Request), true, NULL)
#9 /home/glitzer2/public_html/vendor/symfony/http-kernel/HttpCache/HttpCache.php(258): Shopware\Components\HttpCache\AppCache->forward(Object(Symfony\Component\HttpFoundation\Request), true)
#10 /home/glitzer2/public_html/vendor/symfony/http-kernel/HttpCache/HttpCache.php(275): Symfony\Component\HttpKernel\HttpCache\HttpCache->pass(Object(Symfony\Component\HttpFoundation\Request), true)
#11 /home/glitzer2/public_html/engine/Shopware/Components/HttpCache/AppCache.php(133): Symfony\Component\HttpKernel\HttpCache\HttpCache->invalidate(Object(Symfony\Component\HttpFoundation\Request), true)
#12 /home/glitzer2/public_html/vendor/symfony/http-kernel/HttpCache/HttpCache.php(206): Shopware\Components\HttpCache\AppCache->invalidate(Object(Symfony\Component\HttpFoundation\Request), true)
#13 /home/glitzer2/public_html/engine/Shopware/Components/HttpCache/AppCache.php(114): Symfony\Component\HttpKernel\HttpCache\HttpCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#14 /home/glitzer2/public_html/shopware.php(101): Shopware\Components\HttpCache\AppCache->handle(Object(Symfony\Component\HttpFoundation\Request))
#15 {main}
Time:	
2016-10-14T10:43:42.198796+0200
Channel:	
core
request:	
{
    "uri": "/widgets/SwagCustomProducts/saveConfiguration",
    "method": "POST",
    "query": {
        "module": "widgets",
        "controller": "SwagCustomProducts",
        "action": "saveConfiguration"
    },
    "post": {
        "custom-option-id--4": "12",
        "custom-option-id--3": "10",
        "custom-option-id--1": "Constanze",
        "templateId": "1",
        "number": "DL0001"
    }
}
session:	
{
    "sessionId": "41df950978b1d86c8035ac56b70caf24dd0a87017c382dabd361844248cbd4f3",
    "sArea": null,
    "sCountry": null,
    "sState": null,
    "X-CSRF-Token": "dVu9ig1ivpg2bAuOK9NvJhYyiMRQjT",
    "Bot": null
}
shopId:	
1
shopName:	
Glitzerladen

```

&nbsp;

---

<div class="post-metadata">

**Author:** ![NextMike](https://avatars.discourse-cdn.com/v4/letter/n/838e76/32.png) [@NextMike](https://forum.shopware.com/u/NextMike)\
**Post date:** [15. Oktober 2016 um 06:45 UTC](https://forum.shopware.com/t/custom-products-v2-problem-mit-csrf-validation/40537/2 "2016-10-15T06:45:12Z")

</div>

Guck mal hier ob es bei Deinem Problem hilft:&nbsp;[https://forum.shopware.com/discussion/41201/checkout-invalid-token-exception#latest](https://forum.shopware.com/discussion/41201/checkout-invalid-token-exception#latest)

---

<div class="post-metadata">

**Author:** ![bholbein](https://avatars.discourse-cdn.com/v4/letter/b/67e7ee/32.png) [@bholbein](https://forum.shopware.com/u/bholbein)\
**Post date:** [15. Oktober 2016 um 13:09 UTC](https://forum.shopware.com/t/custom-products-v2-problem-mit-csrf-validation/40537/3 "2016-10-15T13:09:47Z")

</div>

Danke vielmals. Ich bin nicht sicher ob das Deaktivieren ein gute Idee ist, da ich über den Tag verteilt doch auch häufig Spamversuche sehe, die über die Prüfung stolpern.

---

<div class="post-metadata">

**Author:** ![NextMike](https://avatars.discourse-cdn.com/v4/letter/n/838e76/32.png) [@NextMike](https://forum.shopware.com/u/NextMike)\
**Post date:** [15. Oktober 2016 um 13:11 UTC](https://forum.shopware.com/t/custom-products-v2-problem-mit-csrf-validation/40537/4 "2016-10-15T13:11:08Z")

</div>

Da war auch eine&nbsp;andere Lösung drin.

---

<div class="post-metadata">

**Author:** ![Romina](https://avatars.discourse-cdn.com/v4/letter/r/b782af/32.png) [@Romina](https://forum.shopware.com/u/Romina)\
**Post date:** [17. Februar 2017 um 12:36 UTC](https://forum.shopware.com/t/custom-products-v2-problem-mit-csrf-validation/40537/5 "2017-02-17T12:36:05Z")

</div>

Hallo,

&nbsp;

hast du das &nbsp;Problem mit dem Warenkorb immer noch? Bei uns tritt es nämlich genau so auf, wie du beschrieben hast. Falls du es gelöst hast, würde ich mich über deinen Lösungsweg freuen 🙂

Grüße - Romina

---

<div class="post-metadata">

**Author:** ![Zocas](https://avatars.discourse-cdn.com/v4/letter/z/50afbb/32.png) [@Zocas](https://forum.shopware.com/u/Zocas)\
**Post date:** [19. Februar 2017 um 18:58 UTC](https://forum.shopware.com/t/custom-products-v2-problem-mit-csrf-validation/40537/6 "2017-02-19T18:58:03Z")

</div>

Wenn ihr&nbsp; Custom Products verwendet, einfach mal deaktivieren und dann wieder aktivieren, das wirkt wahre Wunder ![Wink](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/b3785da0cbf2c8566cb535dcf55b2730b5224899.png "Wink") !

---

<div class="post-metadata">

**Author:** ![Romina](https://avatars.discourse-cdn.com/v4/letter/r/b782af/32.png) [@Romina](https://forum.shopware.com/u/Romina)\
**Post date:** [21. Februar 2017 um 11:32 UTC](https://forum.shopware.com/t/custom-products-v2-problem-mit-csrf-validation/40537/7 "2017-02-21T11:32:43Z")

</div>

Hey! Danke für den Tipp - hat leider nichts verändert ☹
