【问题标题】:CakePHP 3.5 w/ bootstrapui modal error dialog boxCakePHP 3.5 w/bootstrapui 模态错误对话框
【发布时间】:2017-09-25 20:42:43
【问题描述】:

我正在使用安装了 FriendsOfCake bootstrapUI 的 CakePHP 3.5。在登录屏幕上或注销后,会显示模式对话框错误。文字是:mydomain.com 说:错误:禁止错误 error.log 中没有记录错误 这也发生在 3.4 版中。

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

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

//来自Controller/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');
}

【问题讨论】:

    标签: twitter-bootstrap modal-dialog cakephp-3.4


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-07-07
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多