Giter Club home page Giter Club logo

Comments (15)

deoxxa avatar deoxxa commented on May 23, 2024

I can confirm this, I'm looking into it now.

from sonataadminbundle.

deoxxa avatar deoxxa commented on May 23, 2024

It's definitely included in the form, it just seems to be not written out when form_rest() is called in the template. Perhaps this is a Forms issue?

from sonataadminbundle.

deoxxa avatar deoxxa commented on May 23, 2024

I think I've fixed this with https://github.com/sonata-project/AdminBundle/pull/102 - @saptaru can you test it and see if it works for you as well?

from sonataadminbundle.

saptaru avatar saptaru commented on May 23, 2024

Yes , this solved the issue , but why the form_rest(form) is not output the token field anyway ? If I am doing the same thing in my contact form the token is there, but no in the AdminBundle forms...

from sonataadminbundle.

rande avatar rande commented on May 23, 2024

The issue has been fixed :
https://github.com/sonata-project/AdminBundle/commit/136021737fdd815778aecba7272f5e4b3c74bd05

from sonataadminbundle.

razeta avatar razeta commented on May 23, 2024

I been working in a local development enviroment and I have push a system to production and It give me the "The CSRF token is invalid. Please try to resubmit the form" error. Anybody has an idea why this could be? In dev everything is working fine.

Thanks

from sonataadminbundle.

rande avatar rande commented on May 23, 2024

Is your version up to date ?

from sonataadminbundle.

razeta avatar razeta commented on May 23, 2024

I just updated the Sonata Admin Library and now the fields are not beeing rendered. I do not know if the CSRF problem is gone. I was working with 01/04/2011 version I belive.

from sonataadminbundle.

rande avatar rande commented on May 23, 2024

ok then update your admin class, the property definition are not supported anymore. Please read the documentation.

from sonataadminbundle.

razeta avatar razeta commented on May 23, 2024

Well, I updated the bundle and the Admin class. Still getting the CSRF invalid error. But I do not know what can be the problem because in my local development enviroment I do not have this problem, only when I push to a production enviroment. I am using WAMP and in production server UBUNTU.

Any idea what configuration I could miss in prod for this to happen?

In addition, Im using default symfony2 configuration, FosUserBundle and the only thing I see different is when I hit the create/edit button I get a url ending at create?uniqid=4e52dd5faefb9

from sonataadminbundle.

razeta avatar razeta commented on May 23, 2024

No ideas?

from sonataadminbundle.

rande avatar rande commented on May 23, 2024

The CSRF token issue has been fixed a long time ago ...

The only reasons why you can get the error :

  • the bundle is not update to date
  • you have a custom template layout which contains the remaining bug ...

On Aug 23, 2011, at 9:16 PM, razeta wrote:

No ideas?

Reply to this email directly or view it on GitHub:
#97 (comment)

from sonataadminbundle.

razeta avatar razeta commented on May 23, 2024

That is odd.

I just update yesterday the bundle and I updated the custom template that I was using and delete cache from prod to rebuild. Still getting the error. I have override the standar_layout.html.twig template and delete some stuff mainly html tags.
Add two custom css and delete bundle css. I mean, that could not bee it, right.....

My biggest question is why locally using wamp server at windows 7 is working perfectly and when I push it to a prod server using ubuntu is not working? Maybe a php extension? or apache configuration?

from sonataadminbundle.

biozshock avatar biozshock commented on May 23, 2024

Will add a note here, as it's first in google when searching for such issue.
In addition to @rande comment above:

  • Be sure you are have rewrites in your webserver so they allow transferring of a query string.

In my case forgot to add such thing in nginx config and ran into this issue.

from sonataadminbundle.

jeantristan avatar jeantristan commented on May 23, 2024

I have got the issue again.

vagrant@scotchbox:/var/www/publishr$ php composer.phar show sonata-project/*
sonata-project/admin-bundle                  3.x-dev 7386ec0 The missing Symfony Admin Generator
sonata-project/block-bundle                  3.1.1           Symfony SonataBlockBundle
sonata-project/cache                         1.0.7           Cache library
sonata-project/core-bundle                   3.0.3           Symfony SonataCoreBundle
sonata-project/doctrine-mongodb-admin-bundle 3.x-dev 1157efc Symfony Sonata / Integrate Doctrine MongoDB ODM into the Son...
sonata-project/exporter                      1.6.0           Lightweight Exporter library

Rewriting is enabled on the apache server.
Cache was cleared.
No custom template.
Any clue?

from sonataadminbundle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.