TransWikia.com

How can I automatically flag new comments?

Drupal Answers Asked by sdfff on December 5, 2020

I have a Drupal 8 site with Flag and Rules modules. How to flag a new comment ?

I want that when a user creates a comment, the comment should be automatically flagged.

I created a type of Flag on the comments and I created a rule with the event "When a new comment is posted".

What should I put in action ?

enter image description here

enter image description here

One Answer

Flag ID should be the ID of the flag being set. If you go to /admin/structure/flags, and Edit the flag, the machine name/ID of the flag will be at the end of the URL -- so /admin/structure/flags/manage/{flag_id}.

I've not used Rules on D8, but for Entity ID, if you click "switch to data selection" and then click the field, I think it should give you some autocomplete options to help select the data you want. You'll likely end up with something like "comment:id".

Answered by Mrweiner on December 5, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP