No success message on moderator 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
- Set
'moderatorExcluded' => true - 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 %}
- 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
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:
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.
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 Figured it out — there was no discernible feedback on the front-end due to #313.