eZ Community » Forums » eZ Publish 5 Platform » Missing form token from Request -...
expandshrink

Missing form token from Request - content_fields.html.twig

Missing form token from Request - content_fields.html.twig

Tuesday 08 March 2016 6:31:11 pm - 1 reply

Hi,

I integrate  paypal  API in my controller . Coming back from the paypal engine after payment i get following Error:

 CRITICAL - Uncaught PHP Exception Twig_Error_Runtime: "An exception has been thrown during the rendering of a template ("Missing form token from Request") 
in "EzPublishCoreBundle::content_fields.html.twig" 
at line 415." at /srv/www/public/dev.koelner-anwaltverein.de/htdocs/vendor/twig/twig/lib/Twig/Template.php line 148

It happen when rendering the page logo 

 {{ ez_render_field( content, 'image', { parameters:{ image_class:'original' } } ) }}

Is this caused by receiving POST Variable from paypal after payment ?

PS: Eliminating the logo ez_render_field everything works fine.

Community Project 2014.7

 

Thanks for helping

Modified on Wednesday 09 March 2016 9:07:31 am by Ramzi Arfaoui

Thursday 17 March 2016 11:41:00 am

so i have disable to add the form token for POST comming from outside the site and it works now.

 $response->setContent( ezxFormToken::output( $response->getContent(), false ) );

 

Help Links:

 http://share.ez.no/forums/ez-publish-5-platform/public-api-search-service-bug-while-post 

https://github.com/ezsystems/ezpublish-legacy/blob/master/extension/ezformtoken/event/ezxformtoken.php

and Example in:

eZ/Bundle/EzPublishLegacyBundle/EventListener/CsrfTokenResponseListener.php

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from