I am trying to implement a functionality that would allow authenticated users to report comments on a forum post. My first thought was to do it using workflows but comments dont have a workflow functionality by default. I am working in a restricted environment so I am not allowed to use external modules.

My current approach is to have a Taxonomy field on comments which can be set to report. And then deciding on the twig file whether or not reported comments should be shown. However I'm having trouble setting the taxonomy term on a comment to report when a link/button is pressed. I've tried to use ajax to call a php function, but that seems to break all the menus on the site.

Does anybody have any ideas on how I can implement this?

  • You sound like you are trying to replicate the flag module drupal.org/project/flag If I was in your position, I would have a look at the flag module and try to replicate its functionality as you can't download external modules Mar 24 at 7:55


Your Answer

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