I have three content types- articles, blogs ans forums. I want to disable comments on the articles and blogs but only allow comments on forums. I followed the directions in the comment documentation and disabled default comment setting for the articles and blogs, but on forums I set this to read/write.

Under permissions, I am allowing all authenticated users to post comments. I thought that since I disabled the default comment settings on the specific content types where I don't want comments that this would override allowing comments yet allow users to comment on foums.

Instead all users are alllowed to post comments to any content type after logging in. Not sure what I am doing wrong but would appreciate you looking into it. Thanks.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Everett Zufelt’s picture

Are comments still available on newly created content after your changes?

Disabling comments on a content type only affects newly created content, you will need to disable comments manually on the old content. If you have a lot of nodes to change you can try a db query.

E.g. (example, check the values':

UPDATE node SET comments = 0 WHERE type = 'article';

Note, the above is not a working db statement, just an example to get you started looking in the right place.

Thomasr976’s picture

Thanks for getting back so quickly. Good point. Yes all comments can still be seen after my changes. That's not a problem.

I will have to see if new new blogs or articles posts allow comments at all. I don't mind it if users can see existing comments.

Everett Zufelt’s picture

Status: Active » Fixed

Just to clarify, when you disable the comment form on an older node the comments will still be available for viewing, but users will not be able to add more comments.

Everett Zufelt’s picture

Category: bug » support
Thomasr976’s picture

Very strange. I disabled comments as you suggested and I can not see any comments as an anonymous user. However, if I check "Read" then as an anonymous user i can see the comments, but can not add any. I am going to try that on the content types to see what happens.

Tom

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

garyoak’s picture

Obviously, you can't add anything, since it is disable by you only.
Equestrian vacations

codemuncher’s picture

So If I disable comments for a content type, they will not be disabled for the content of that content type if comments were entered in those page unless i write a sql query to force it?

Alright, but in all fairness could someone please add this important detail in the content type comment options?
As an admin, I should be informed of this behavior because there's nothing about this behavior that is what I expected. If I select "hide" for comments at the content type level, I expect they should simply be hidden.

thanks.