Symfony 2 and jQuery mobile 1.1.1

梦想与她 提交于 2020-01-05 04:57:33

问题


I have created a simple page using Symfony 2.1 and jQuery Mobile 1.1.1. My whole page is behind a firewall.

After logging in, the menu appears well, but the URL in the window's location bar is localhost/mobile/web/app_dev.php/loginCheck (which is Symfony's login_check URL). When I navigate to another page by using one of my menu buttons, everything goes fine, but when I press the Back button in the new page's header, it tries to go back to the loginCheck page, which, of course, fails, as loginCheck is an invalid route. Has anyone faced this problem before?


回答1:


As I mention in my comment, if I specify my form as

<form method="post" action="{{ path('login_check') }}" data-ajax="false">

Everything works as expected. This, however, should be considered as a workaround, I think.



来源:https://stackoverflow.com/questions/12516902/symfony-2-and-jquery-mobile-1-1-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!