comments icon indicating copy to clipboard operation
comments copied to clipboard

No success message on moderator comments

Open pl-mnm opened this issue 10 months ago • 4 comments

Describe the bug

I have set 'moderatorExcluded' => true, and when a moderator posts a comment, it is submitted succesfully but nothing happens on the screen: there is no success message and the comment doesn't appear. When refreshing the page the message appears. It would be nice to have some sort of feedback on submission. Success message appears when non-moderators post a message.

Steps to reproduce

  1. Set 'moderatorExcluded' => true
  2. The code is inside a {% nocache %} tag, I'm not sure it makes a difference:
{% nocache %}
  {{ craft.comments.render(commentsOwnwerId) }}

  {{ craft.comments.renderCss(commentsOwnwerId) }}
  {{ craft.comments.renderJs(commentsOwnwerId, {}, true) }}
{% endnocache %}
  1. Post a message as a user with moderator rights

Craft CMS version

5.5.8

Plugin version

dev-craft-5 as 3.0.4

Multi-site?

No response

Additional context

No response

pl-mnm avatar Feb 28 '25 01:02 pl-mnm

Can't seem to replicate that, as when posting as a moderator, the comment is made, and I'm scrolled to the newly added comment.

The response back from the server should look something like:

Image

engram-design avatar Feb 28 '25 02:02 engram-design

Thanks, I am also getting something similar. It seems that the renderJs tags is causing the issue. As soon as I remove the renderJs tag everything works as expected:

{{ craft.comments.renderJs(commentsId) }}

Edit: I'm also using some custom templates so I'm looking in that direction to see if anything important might have been overwritten.

pl-mnm avatar Mar 03 '25 02:03 pl-mnm

Hmmm, I've been testing with those exact tags, but seems to be working okay (the comment is added to the top of the comments threads). But yep, shoot through any custom templates and I can take a look ([email protected] if easier than here).

engram-design avatar Mar 03 '25 23:03 engram-design

@engram-design Figured it out — there was no discernible feedback on the front-end due to #313.

rungta avatar Mar 04 '25 19:03 rungta