this question has answer here:
declaration of utilitybehavior::beforedelete() should compatible modelbehavior::beforedelete(model $model, $cascade = true) i error when load 1 controller not present in other controller.
and delete action in term controller
public function admin_delete($id = null) { if (!$this->request->is('post')) { throw new methodnotallowedexception(); } $this->term->id = $id; if (!$this->term->exists()) { throw new notfoundexception(__('invalid term')); } if ($this->term->delete()) { $this->session->setflash(__('term deleted')); $this->redirect(array('action' => 'index')); } $this->session->setflash(__('term not deleted')); $this->redirect(array('action' => 'index')); } controller termscontroller
fix declaration of behavior method. if possible, submit correct version maintainer of plugin (if not you).
as mentioned error message, it should be:
public function beforedelete(model $model, $cascade = true) {} yours just
public function beforedelete(model $model) {} etc.
Comments
Post a Comment