Drupal 允许匿名评论

发布于 2024-08-07 09:02:08 字数 290 浏览 3 评论 0原文

我试图允许匿名用户发表评论,但添加评论表单、“添加评论”标题等未显示。对于登录用户来说,它显示得非常完美。

我已允许匿名用户在权限页面中发表评论(不特定于内容类型),允许对特定节点发表评论,并且选择了“匿名发帖者可以留下联系信息”。

什么可能导致这种情况?难道是因为显示此评论区域的 tpl 文件未加载?

谢谢

编辑:问题似乎是 comment-wrapper.tpl.php 的内容没有为匿名用户加载。该文件包含一个结束 div,对于所有用户来说,它应该出现在内容下方,但对于匿名用户来说,它不存在。

I'm trying to allow comments by anon users but the add comment form, "add comments" title etc is not showing. For logged in users it's showing perfectly.

I've allowed comments by anon users in the permissions page (not specific to a content type), comments are allowed for the specific node and "Anonymous posters may leave their contact information" is selected.

What could cause this? Could it be because the tpl file that shows this comment area isnt loaded somehow?

Thanks

EDIT: the problem seems to be that the contents of comment-wrapper.tpl.php isn't being loaded for anon users. This file contains a closing div that should appear below the content for all users but for anon users it's not there.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

誰認得朕 2024-08-14 09:02:08

确保您为匿名用户启用了“访问评论”和“发表评论”权限。

make sure you have both the "access comments" and "post comments" permissions enabled for anonymous users.

ㄟ。诗瑗 2024-08-14 09:02:08

我的第一个猜测是旧版本的页面已被缓存。 (我假设您没有进行任何疯狂的自定义,并且您的网站结构很简单。)

请尝试以下操作:
1)重建主题注册表
2) 清除缓存

如果您有 Devel 模块,这些应该很简单。如果没有请发表评论,我将使用说明编辑帖子。

My first guess would be that the old version of the page is cached. (I assume you haven't done any crazy customizations, and your site structure is straightforward.)

Try the following things:
1) Rebuild the theme registry
2) Clear the cache

These should be straightforward if you have the Devel module. Comment if not and I'll edit the post with instructions.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文