2017-09-25 44 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調用,表單現在按預期工作。