4

The rules modules has default actions setup to unpublish nodes but not comments. Do I need to use PHP to unpublish a comment?

3 Answers 3

8

If you choose the action "Set a data value" and a comment is visible to the action (e.g. because the triggering event is "After saving a new comment") then the data selector will let you choose

comment:status

which you can then choose to set to "Published" or "Unpublished", or (via a data selection) to another available value.

1

I had this same issue using Flag module and this solution worked out great for

the data source was flagged-comment:status in case anyone comes across this

0
0

Make sure you have nodecomment module downloaded and enabled. If node comment module is there, then you will get comments as the first option in rules trigger.

2
  • 1
    If you are referring to drupal.org/project/nodecomment, it doesn't have a D7 version, and @MotoTribe still doesn't tag his questions with D7 yet :) :) :)
    – Jimajamma
    Apr 23, 2012 at 14:49
  • oops, forgot again. Anybody still on 6? ;-)
    – uwe
    Apr 23, 2012 at 15:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.