Bonjour ! pendant plusieurs jours, j 'ai essayé de resoudre un problème que je ne connait pas (je suis débutant à la matière), j'ai rencontré un obstacle different a celle du tuto (site de a à z jour 5) au niveau de admin_edit voici mes quelque code et l'erreur qu'elle affiche :
1 au niveau du articlesController (postController):

function admin_edit($id = null)
{
$this->loadModel('Article');
$this->loadModel('Type_art');
$this->request->data = $this->Article->findFirst(array( // appele la fonction find
'conditions' => array('id' => $id)
));
$tab['type'] = $this->Type_art->findFirst(array( // appele la fonction find
'conditions' => array('id' => '1')
));
$this->request->data->type = $tab['type']->libelle;
$this->set($tab);
}

2 admin_edit :

<div class="page-header">

<h1>Editer un article</h1>

</div>

<form action="<?php echo Router::url('admin/articles/edit'); ?>" method="post">
<?php echo $this->form->input('libelle', 'Dénomination :'); ?>
<?php echo $this->form->input('type_id', 'Type id :', array('type' => 'number', 'min' =>'1', 'max' =>'2')); ?>
<?php echo $this->form->input('type', 'Type :', array('type' => 'label')); ?>
<div class="action">
<input type="submit" class="btn btn-sm btn-primary"></input>

</div>

</form>

3... et après la click sur le bouton valider, il affiche :

Notice: Undefined property: controller::$session in C:\villaweb\www\otiv\gstock\fr\view\layout\default.php on line 56

Fatal error: Call to a member function flash() on a non-object in C:\villaweb\www\otiv\gstock\fr\view\layout\default.php on line 56

et si j'enlève le session sur le dispacher, il me dit :

pages introuvable, page"" introuvble; vue que après edit sur url n' a rien

url : http://localhost/otiv/gstock/fr/oriel/articles/edit

oriel : cockpit

Aucune réponse