CakeDC/comments — Issue #26: CommentWidget never loads custom elements, ajax form posts in new window
Author: tomasm-
Created: 2011-11-12 19:36:13+00:00
State: open

The CommentWidget is supposed to be able to load elements from /views/elements/comments/flat/main.ctp etc, but since the helper is in a plugin itself, the view paths for the elements puts the current plugin ('comments') before the main elements in /views/elements . comment_widget.php needs to set $params['plugin'] = null, prior to the first $View->element() call.

Also, the form.ctp, even when it uses ajax, will open a new window with the results, since the 'target' attribute is set on the form. It should be:

if($target) {
...
echo $this->Form->create($modelName, array('url' => $ajaxUrl));
} else {