CakeDC/comments — Issue #30: undefined variable $commentWidget
Author: butblack
Created: 2011-12-27 19:43:47+00:00
State: open

I have installed the plugin, from the instructions I put the line of code in my posts controller

public $components = array('Comments.Comments' => array('userModelClass' => 'Users.User')); // Customize the User class

/**
* Initializes the view type for comments widget
*
* @return string
* @access public
*/
public function callback_commentsInitType() {
return 'flat'; // threaded, tree and flat supported
}

and the line of code in my view.ctp

options(array('allowAnonymousComment' => false));?>
display();?>

When I go to my view page I keep getting a Notice (8): Undefined variable: comments [APP\View\Posts\view.ctp, line 50]

any ideas?