From bcc1e0e77b50a420926453b0864554f182d92650 Mon Sep 17 00:00:00 2001 From: Hans-Joachim Michl Date: Wed, 30 Aug 2017 17:05:32 +0200 Subject: [PATCH] Error in template selection Using $this->template here is just plain wrong! You want to use the $name argument here too of course! Using $this->template breaks custom actions like so: ...$this->Crud->mapAction('account', [ 'className' => 'Crud.Edit', 'view' => 'edit' ]); function account() { return $this->Crud->execute(); } If there should be a valid case to use $this->template too, we need another try/catch block i suppose. --- src/View/CrudView.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/View/CrudView.php b/src/View/CrudView.php index 56a590f2..6d9bd41d 100644 --- a/src/View/CrudView.php +++ b/src/View/CrudView.php @@ -201,7 +201,7 @@ protected function _getViewFileName($name = null) $this->subDir = null; $this->templatePath = 'Scaffold'; - return parent::_getViewFileName($this->template); + return parent::_getViewFileName($name); } } }