我正在使用安装了 FriendsOfCake bootstrapUI 的 CakePHP 3.5。在登录屏幕上或注销后,会显示模式对话框错误。文本是:mydomain.com 说: ERROR: error denied 错误日志中没有记录错误 这也发生在 3.4 版本中。
这发生在测试服务器以及托管站点上。
有没有办法抑制这个对话框?
// 来自控制器/AppController.php
public function initialize()
{
parent::initialize();
$this->loadComponent('RequestHandler');
$this->loadComponent('Flash');
$this->loadComponent('Auth', [
'authenticate' => [
'Form' => [
'fields' => [
'username' => 'email',
'password' => 'password'
]
]
],
'loginAction' => [
'controller' => 'Users',
'action' => 'login'
],
'unauthorizedRedirect' => $this->referer() // if unauthorized,
return them
]);
// allow display action so our pages controller
// continues to work.
$this->Auth->allow(['display']);
$this->loadComponent('Security');
$this->loadComponent('Csrf');
}