twitter-bootstrapmodal-dialogcakephp-3.4

CakePHP 3.5 w/ bootstrapui modal error dialog box


enter image description hereI'm using CakePHP 3.5 with FriendsOfCake bootstrapUI installed. On the login screen or after logout, a modal dialog error is displayed. The text is: mydomain.com says: ERROR: error forbidden There are no errors recorded in the error.log This also happened in version 3.4.

This happens on the test server as well as on the hosting site.

Is there a way to suppress this dialog?

// from 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');
}

Solution

  • Solved: Found in FF Inspector an Ajax request a list from the database. This was not allowed because sign-in wasn't completed. Removed the unnecessary Ajax call and the form now works as expected.