Hi! I'm trying to do a simple rule which unpublish the comment in certain conditions but I found out that it will not save the comment with unpublished status.
This may be a major bug? Or is it just me? :)
My rule:
{ "rules_unpublish_comments_with_untrusted_urls" : {
"LABEL" : "Unpublish comments with untrusted URLs",
"PLUGIN" : "reaction rule",
"TAGS" : [ "wot" ],
"REQUIRES" : [ "rules", "comment" ],
"ON" : [ "comment_insert" ],
"DO" : [
{ "data_set" : { "data" : [ "comment:status" ], "value" : "1" } },
{ "entity_save" : { "data" : [ "comment" ] } },
{ "drupal_message" : { "message" : "Comment containing untrusted URLs. It will be accepted shortly by moderators." } }
]
}
}
Comments
Comment #1
irous commentedI've been trying to do the exact same thing with Rules (ever since trigger/actions fails with comments + keywords). Anyone have an idea?
Comment #2
tr commentedIf you continue to have a problem with this in the current version of Rules please open a new issue.