Making WordPress.org

Opened 5 months ago

Closed 5 weeks ago

#8028 closed defect (bug) (duplicate)

Unable to preview comment due to permission issue

Reported by: mindctrl's profile mindctrl Owned by:
Milestone: Priority: normal
Component: Make (Get Involved) / P2 Keywords:
Cc:

Description

When trying to preview a comment on make.wordpress.org, I'm receiving the following error in the AJAX response:

{error: "cannot_edit_posts", errorText: "Sorry, you are not allowed to edit posts on this site."}

If it matters, it was this comment: https://make.wordpress.org/core/2025/07/02/proposal-introduce-maintenance-mode-for-components/#comment-47727

Change History (3)

#1 @sajib1223
5 weeks ago

Hi there 👋

I’m still seeing this issue on https://make.wordpress.org/training when trying to preview a comment.

When I click “Preview,” I get the following error:

{"success":false,"data":{"error":"cannot_edit_posts","errorText":"Sorry, you are not allowed to edit posts on this site."}}

To help illustrate, here’s a short video showing the issue in real time:
🎥 https://www.awesomescreenshot.com/video/45815931?key=fbc2112572c1c367f0a16ab0d7c67c8b

Details:

It seems the comment preview action is incorrectly checking for the edit_posts capability, which regular users don't have, causing the error instead of showing the preview.

Hope this helps confirm the problem and move it forward!

This ticket was mentioned in Slack in #meta by sajib1223. View the logs.


5 weeks ago

#3 @ocean90
5 weeks ago

  • Resolution set to duplicate
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.