With any user but the admin, I can't post a comment--when attempting to, I get the "This discussion is closed; You can't post new comments" error.

Could someone please point me to potential causes? Permissions for comments and profiles are open, and comments are enabled in the content type. It works fine for the admin, but even the profile's owner can't post a comment (although the comment form does show up, the error occurs after clicking Save). It's driving me a bit crazy...what setting (and where) is causing this?

Thanks!

-Daniel

Comments

vyasamit2007’s picture

Status: Active » Closed (fixed)

If you are creating a node programmatically then you have to add $node->comment = 2; otherwise the programmatically created node will have comment disabled by default.

If your content type has comments enabled "Read/Write" in your content type settings and you are creating a node programmatically then also you have to give $node->comment = # [1 -> Read Only, 2 -> Read/Write].

swatiphp’s picture

I am just using drupal_get_form to display the comment form but it is giving me error as - This discussion is closed: you can't post new comments.

though it can post comment when the node page is open with comment form.

swatiphp’s picture

Status: Closed (fixed) » Closed (works as designed)

the form name was wrong
the issue is resolved

funkDoc’s picture

Thanks for the tip, this solved my issue.

binwithu’s picture

Issue summary: View changes

which form name is wrong .what you are talking about ..can u explain please @swatiphp