Skip Navigation

[Resolved] moderate_comments permission doesn't work

This support ticket is created 2 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 5.05 hours from now. Thank you for your understanding.

This topic contains 10 replies, has 2 voices.

Last updated by annaA-2 2 years, 8 months ago.

Assisted by: Christopher Amirian.

Author
Posts
#2296799
Screenshot 2022-02-18 at 17.44.33.png

I am trying to give permission to moderate comments to a group of users I created it with toolset access.
I put the check to moderate_comments in other capabilities tab but it doesn't work.
How can I solve it? Should I check some other option?

Thank your for your help.

#2298009

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

To get a sense of the issue I have a few questions:

- What happens if you assign it to a single user instead of a group. Does it work?
- Would you please go to Toolset > Settings and at the bottom click the Toolset Debug Information and Troubleshooting link and paste the top code to the Debug information box below so that I can get a sense of your setup?
- Do you use any third-party plugin to add more functionality to the post comments?
- The issue that you are experiencing is that the user group can not edit the comments? If yes, did you create the access from a normal WordPress role or from scratch? Sometimes it is better to have a starting role from WordPress and then add the capabilities.

Thank you.

#2298145

Hi Cristopher,
I'll reply to you after your question:
- What happens if you assign it to a single user instead of a group. Does it work?
I don't know. How can I do it with toolset access?

- Would you please go to Toolset > Settings and at the bottom click the Toolset Debug Information and Troubleshooting link and paste the top code to the Debug information box below so that I can get a sense of your setup?
I don't know if I can paste it here. I prefere do it in a private message.

- Do you use any third-party plugin to add more functionality to the post comments?
No, I don't.

- The issue that you are experiencing is that the user group can not edit the comments? If yes, did you create the access from a normal WordPress role or from scratch? Sometimes it is better to have a starting role from WordPress and then add the capabilities.
I'm trying to do the permission to a role created by Toolset.

Thank you.
Anna.

#2298935

Christopher Amirian
Supporter

Languages: English (English )

Hi Anna,

Thank you for the details. The debug information can be added to the box below this reply which is designated Debug Information.

To make sure if this is something that needs to be reported as a code related issue or it is something related to your installation I created a clean installation of WordPress and Toolset.

Would you please try to replicate the issue there? That way I will be able to report this to the secind tier for further investigation.

You can access the clean installation website dashboard here:

hidden link

Thank you.

#2298969
Screenshot 2022-02-21 at 15.44.36.png

Hi Cristopher,
I'm sending you the debug code as you asked.

I can't replicate the bug because in your demo there isn't toolset access as you can see in my attachment.

At the moment I solved giving to my user group the editor access, but it isn't the right way because editors have more privilege than my user group I had to set toolset access restrictions for every kind of content.

Thank you for your help.

Anna.

#2299953

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

Thank you for the infomration. I enabled all the other Toolset plugins including the Toolset Access that you can test the issue there.

I'd appreciate it that you replicate the issue so I can report:

hidden link

Thank you.

#2300059

Hi Cristopher,
I created a moderator role with moderate-comments privilege.
I created a moderator user in your demo, but when I log into the website I don't see comments.
In my version I see comments but I can't approve them.
We have two different situations.
Thank you.

#2300973

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

I checked the details and the problem that you are experiencing is related to the way WordPress has Moderate_comment capability set up.

If you check the documentation below:

https://wordpress.org/support/article/roles-and-capabilities/#moderate_comments

It says:

Allows users to moderate comments from the Comments Screen (although a user needs the edit_posts Capability in order to access this)

So for that capability to work you need to also grant the edit_posts capability to the user.

Thanks.

#2301823

Hi Cristopher,
I added edit_posts capability to my user but it doesn't work.
At the moment I solved it by giving to him the editor's permission but I think it isn't the best solution.

Thank you for your support.

#2302027

Christopher Amirian
Supporter

Languages: English (English )

Screen Shot 2022-02-24 at 16.16.10.png

Hi there,

I enabled the edit_post capability in the clean installation and added a username called commenter.

With that user, I had access to the comments and by going to WordPress Dashboard > Comments, I could select the comment and approve/unapprove it.

That is what the moderate_comment capability is which works ok.

Thank you.

#2304753

In my installation, the problem is not fully resolved, but I don’t need more help now because I solved it in another way.
Thank you!