cakephp + cache + formhelper inside <cake:nocache></cake:nocache> = error
in all my views i have a login/register (cake)form.
my question:
can i use the file cache engine with <cake:nocache>form</ cake:nocache>
1.) open url "www.domain.com/home"
2.) cachefile generated 3.) look perfect 4.) refresh (f5) 5.) error (when debug=1):Parse error: parse error in C:\xampp\htdocs\cake_1.2.3.8166\app\tmp\cache\view \cake_1_2_3_8166_开发者_高级运维home.php on line 752
cachefile -> line 752 -> </html>
cakephp: 1.2.3.8166
example:<cake:nocache>
<?
$user = $session->read("user");
if(!$user){ //$user true or false
echo "login:";
echo $form->create('AdminUser', array('action' =>'login_load'));
echo $form->input('email',array('label'=>false));
echo $form->input('password',array('label'=>false));
echo $form->submit('Login', array('id'=>'login'));
echo $form->end();
}else{
echo "hello user!";
}?>
</cake:nocache>
it's a cakephp bug. cake google groups
The dev state at https://trac.cakephp.org/ticket/6034 CakePHP does not support using the form helper from within tags at this time.
精彩评论