Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Comments module: comments are not being posted


Go to End


808 Views

Avatar
sandeto

Community Member, 1 Post

5 August 2014 at 11:27pm

Hello, everyone, it's my first post here.

I'm seeking your help for the following issue.

I am still testing silverstripe on localhost (using XAMPP). I am using the simple default theme. I have got Blog module installed (v.0.7.0), together with the Comments module (v. 1.1-dev) and GridField Bulk Editing Tools (v. 2.0.0). I have got $PageComments in the simple/templates/layout/Page.ss file and I have ticked the "Allow comments" checkbox for all of my blog posts. However, when I try to post a comment, nothing happens but a redirection to url http://localhost/silverStripe/blog/title-of-the-blog-post/#Form_CommentsForm, but no coments are posted and the comment input field still contains the comment text.

I have got the following configuration in mysite/_config.php:

Commenting::add('SiteTree', array(
'require_login' => true, // boolean, whether a user needs to login
'required_permission' => false, // required permission to comment (or array of permissions)
'include_js' => true, // Enhance operation by ajax behaviour on moderation links
'use_gravatar' => true, // set to true to show gravatar icons,
'gravatar_size' => 80, // size of gravatar in pixels. This is the same as the standard default
'show_comments_when_disabled' => false, // when comments are disabled should we show older comments (if available)
'order_comments_by' => "\"Created\" ASC",
'comments_per_page' => 10,
'comments_holder_id' => "comments-holder", // id for the comments holder
'comment_permalink_prefix' => "comment-", // id prefix for each comment. If needed make this different
'require_moderation' => true,
'html_allowed' => true, // allow for sanitized HTML in comments
'html_allowed_elements' => array('a', 'img', 'i', 'b'),
'use_preview' => false, // preview formatted comment (when allowing HTML). Requires include_js=true
));

What am I doing wrong?
Thanks in advance! :)