Prestashop 1.6.x admin error 500

A common error that could appear after you install prestashop is

Fatal error: Declaration of AdminLoginControllerCore::viewAccess() must be compatible with AdminControllerCore::viewAccess($disable = false) in /var/www/prestashop/controllers/admin/AdminLoginController.php on line 27

or, if you haven’t set prestashop into dev mode, you’ll get a 500 error.

The way to fix this is simple:

  • go to ROOT/controllers\admin\AdminLoginController.php
  • al line 153 you’ll have to change

public function viewAccess()  to  public function viewAccess($disable = false)

 

After you did this, your admin should appear.

7 thoughts on “Prestashop 1.6.x admin error 500

    1. honestly, at the moment i have not idea, because the ControllerCore abstract class has the method without parameters, BUT the AdminControllerCore class, that extends ControllerCore , had it with that parameter… so basically someone forgot something… also i used prestashop 1.6.1.18, Also if you search the AdminController class that was extended by AdminLoginControllerCore, you;ll see it was registered but without a path, but pretashop “knows” how to fix the exntension of the class so that it won;t say “Oooops”. So sorry i couldn;t give you a good answer.

      Like

  1. Funciona Correctamente con prestashop 1.6.1.18 ,,, Muchas gracias
    ¿Una Pregunta? y Para la versión de prestashop 1.7 ¿funcionaria el mismo método ?

    Like

Leave a comment