Answer the question
In order to leave comments, you need to log in
Why action in symfony2 is executed twice?
Good day. I started learning symfony2 and ran into this problem: for some reason, all actions are executed twice. I noticed this when I tried to fasten the captcha, the code was generated incorrectly there - I generate it, look at the session - everything is correct, but then I switch to, say, the main one with var_dump($_SESSION) and there is already a completely different one. I output the code from the method that generates it to the browser - it is displayed once in the browser, I output it to a file - twice. I thought about the crookedness of the bundle and scored, now I'm playing with swiftmailer and the same problem. I call indexAction once with the creation of a letter in the browser, and two letters are created, and they are absolutely identical. Where to dig?
Answer the question
In order to leave comments, you need to log in
Oh, as usual, it's a matter of inattention. The problem was in the layout. The person who did the layout did this: <img src="#" />
- the page turns out to itself constantly and turned to each request. Removed sharp, everything was fine.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question