-1

我一直在玩评论,制作自定义评论部分并编辑模块。我还在“评论”表中添加了新的数据库列,因此我可以为不同类型的页面提供不同的评论集。一路走来,我想我把那里的模块搞砸了。现在,当我转到任何页面或文章并进行编辑时,我没有可以启用评论的“评论设置”部分。同样,评论不再出现在任何页面上。

可能发生了什么?我该如何解决?

4

2 回答 2

1

要配置特定内容类型的评论设置:

  1. 导航到内容类型管理页面(管理 > 结构 > 内容类型或http://example.com/admin/structure/types)。

  2. 找到您要启用的内容类型,然后单击“编辑”链接。

  3. 向下滚动并单击“评论设置”选项卡。

  4. 您可以在此处指定几个不同的设置(某些选项在您选择某个设置之前不会出现)。


新内容的默认评论设置

这种类型的未来内容的评论设置将默认为:

Hidden: No comments are allowed, and past comments are hidden.
Closed: No comments are allowed, but any past comments remain visible.
Open: Any future content of this type is open to new comments.

注意:此设置是默认设置,不会追溯该类型的现有内容。穿线

启用此选项后,评论将显示在线程列表中(回复缩进以使讨论更容易理解)。每页评论数

指定一页上显示的最大评论数(如果超出此限制,将添加其他页面)。允许评论标题

启用此选项后,用户可以为其评论填写标题(标题是可选的)。在与评论相同的页面上显示回复表单

启用此选项后,回复表单将显示在与评论相同的页面上。(如果未选择此项,单击“回复”将带您进入一个新页面,您可以在其中填写回复表。)预览评论

您可以指定预览是“必需”(始终在保存评论之前显示)、“禁用”(从不显示)或“可选”(用户可以选择显示预览)。

注意:请务必在配置设置后单击“保存内容类型”。

于 2013-04-11T04:03:47.213 回答
0

在这里,我假设您在评论表中有数据,并且您不想丢失数据。在执行以下步骤之前,只需备份您的数据库,以便如果出现任何问题,您可以进行备份。并将评论表作为单独的备份,没有问题的列。

Step1: Go to module and disable comment module.
Step2: Now uninstall comment module which is in uninstall tab. Now go to db and confirm comment table is deleted. If it is not delete, drop table manually.
Step3: Delete comment folder from core module's folder. 
Step4: Copy fresh comment folder. 
Step5: Now go to module page and enable comment module.
Step6: To debug just create any page and add comment and then verify.
Step7: If it is working, Then drop comment table and restore if from table backup.
Step8: Repeat step6 and verify. 

注意:不建议在生产环境中使用。如果它是产品,请尝试获得一些专家帮助。

注意2:我在drupal 7.20中试过这个

于 2013-04-14T17:36:38.067 回答