2017-09-25 43 views
0

enter image description here我使用的CakePHP 3.5与FriendsOfCake bootstrapUI安装。在登录屏幕上或注销后,将显示模态对话框错误。该文本是:mydomain.com说:错误:错误禁止 error.log中没有记录错误 这也发生在版本3.4。CakePHP 3.5 w/bootstrapui模式错误对话框

这发生在测试服务器以及托管站点上。

有没有办法抑制这个对话框?

从控制器/ 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'); 
} 

回答

0

解决:发现在FF检查Ajax请求从数据库列表。这是不允许的,因为登录未完成。删除了不必要的Ajax调用,表单现在按预期工作。