对于那些有cakeDC注释插件经验的人,我可以得到一些指导吗。
我的视图页面上的输出是:
Element Not Found: Elements/Commentscomments/tree/main.ctp
我知道它找不到正确的文件夹,因为在查找文件时缺少正斜杠。
添加到此页面的视图代码为:
<div id="post-comments">
<?php $this->CommentWidget->options(array('allowAnonymousComment' => false));?>
<?php echo $this->CommentWidget->display();?>
</div>
我该如何着手解决这个问题?在解决路径问题方面,我不知道该找什么,也不知道该在哪里找。
提前谢谢。
据我所知,cakeDC创建的这个插件还没有完全移植到2.X中。我已经在中设置了导致这个问题的元素的特定路径
public function display(){} controller found in the CommentWidgetHelper.php file.
您还需要调整其他一些$this->element()
调用。如果不更改这些项目,它将无法从注释插件中正确读取它们。
我发现这次提交为我解决了问题:https://github.com/CakeDC/comments/commit/75cf8085fa96d1491cb31d2eed10b2ce18331e99