The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
Commenting on posts...
 
Share:
Notifications
Clear all

Issue Commenting on posts with status "draft"

1 Posts
1 Users
0 Reactions
494 Views
Posts: 1
Topic starter
(@webtron)
New Member
Joined: 1 year ago

Hi,

We have a internal system where some posts have status "drafts". Previously, until a couple of days ago, it was possible for our users to comment on these posts. Comment status is set to "open" in WordPress for every post, but suddently (after recent plugin update) they get a error message when trying to leave a comment on a "draft post".

"Sorry, comments are not allowed for this item" when trying to publish the comment.

I've tracked this error down to the file wpdiscuz/utils/class.WpdiscuzHelper.php
Line 1730:

if (current_user_can("read_post", $comment_post_id)) {
 // return new WP_Error("comment_on_draft", __("Sorry, comments are not allowed for this item.", "wpdiscuz"), 403);
 return true;
}

Here I have disabled the return of the error and rather returned true, and users can now comment again on "draft posts".

But this is of course only a temporary fix - any way to permanently make it possible to comment on draft posts again?

Share: