The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
Search
Close
AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Commenting on posts...
 
Notifications
Clear all

Issue Commenting on posts with status "draft"

1 Posts
1 Users
0 Reactions
1,016 Views
Posts: 1
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@webtron)
New Member
Joined: 2 years ago
[#7731]

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: