こんにちは、私はCakePHPのコメントプラグインを使用しようとしているが、それは私に次のエラーCakePHPのコメントプラグインの問題
Missing Method in CommentsController Error: The action index is not defined in controller CommentsController Error: Create CommentsController::index() in file: app\controllers\comments_controller.php.
これまでのところ、私はコメントのテーブルを作成しましたを与えるhereを発見したプラグインして、コメントを追加し、それを追加しました私は「取る」アクションにコメントを追加すると、次のコードは、コントローラをテストするには:私はルートを追加
public function beforeFilter() {
parent::beforeFilter(); $this->passedArgs['comment_view_type'] = 'flat'; $this->passedArgs['actionNames'] = 'take';
}
function take($id) {
$this->Test->recursive = 2; $this->set('test', $this->Test->read(null, $id));
}
Router::connect('/comments/:action/*',array('plugin' => 'comments','controller' => 'comments'));
私は誰もこのプラグインを以前に使ったことがあり、助けてくれるのだろうかと思っています。
おかげで、
Brary
、プラグインに問題があるようですので、私はCakeDCコメントプラグインに移動しhttps://github.com/CakeDC/comments – Brary