An Internal Server Error Occurred-- Is there an error log I can check?

Hi everyone, I’m struggling with “Internal Server Error”…

image

It seems to depend on the table that was “baked” in the console.

I’m suspecting that it is the foreign keys that are causing these errors since those forms are mostly effected by these error.

So I decided to make one from scratch called persons. The internal server error occurred here as well.

Here are the code in table, entity, controller and template.

Table:

namespace App\Model\Table;

class PersonsTable extends Table
{
public function initialize(array $config): void
{
$this->addBedhavior(‘Timestamp’);
}
}

Entity:

namespace App\Model\Entity;

use Cake\ORM\Entity;

class Person extends Entity
{
protected $_accessible = [
‘*’ => true,
‘id’ => false,
‘email’ => false
];
}

Controller:

namespace App\Controller;

class PersonsController extends AppController
{
public function index()
{
$this->loadComponent(‘Paginator’);
$persons = $this->Paginator->paginate($this->Persons->find());

    $this->set(compact('persons'));
}

}

It’s probably logging this in logs/error.log.

1 Like

It’s been resolved! Templates/Error was deleted by mistake.