Skip to:
Content

BuddyPress.org

Opened 7 years ago

Closed 6 years ago

#7592 closed defect (bug) (fixed)

Manual approval for blog post comments is bypassed when replying from BuddyPress activity stream

Reported by: aleon4's profile aleon4 Owned by: r-a-y's profile r-a-y
Milestone: 3.0 Priority: normal
Severity: normal Version: 2.0
Component: Blogs Keywords: dev-feedback has-patch commit
Cc:

Description

I want to moderate and receive notifications for comments. I have the appropriate options turned on in my WordPress Discussion Settings but the comments just post automatically as if there’s no moderation. Also comment/moderation notifications are not being sent. I tested whether emails are being sent from the website and the test notification emails are able to go through.

I turned off all the plugins I could to see if it was another plugin’s issue – the only one I didn’t turn off was BuddyPress (since it’s a part of the theme). The comments were still bypassing moderation and notifications.

We activated BuddyPress on another website whose comments/moderation was working to see if the BuddyPress plugin would break it. And it did break – all of a sudden the comments bypassed moderation and notifications.

Since commenting is so integral to WordPress I was surprised that I was having this issue. Do you know if there’s something specific that I could check within the BuddyPress plugin?

Multisite running WordPress 4.7.3
Subdirectory
BuddyPress Version 2.8.2
BuddyBoss Social Learner theme -Using child theme
Did not modify core files

The other website we’ve tested on is using the WPLMS theme. Comment moderating/notifications were working until we activated BuddyPress.

Attachments (2)

Screen Shot 2017-08-31 at 4.03.51 PM.png (178.1 KB) - added by aleon4 7 years ago.
Discussion Settings
7592.01.patch (4.4 KB) - added by r-a-y 7 years ago.
Disables activity commenting for sub-sites requiring manual approval for blog comments.

Download all attachments as: .zip

Change History (20)

@aleon4
7 years ago

Discussion Settings

#1 @hnla
7 years ago

I'm not clear on your exact steps here to this issue, but we have some areas in our activity comments / post sync that are not 100% for various reasons.

Leaving a couple of reference ticket links to past efforts to address some issues:

https://buddypress.trac.wordpress.org/ticket/6719#comment:7
#7107

#2 @r-a-y
7 years ago

  • Component changed from Core to Activity
  • Keywords reporter-feedback added
  • Priority changed from strategic to normal
  • Severity changed from critical to normal
  • Version 2.8.2 deleted

@aleon4 - Thanks for the report, but as hnla mentioned, could you please provide a list of steps to duplicate the issue?

That will help us determine where the problem is. Thanks!

#3 @aleon4
7 years ago

The only step for duplicating the issue is installing the Buddy Press plugin.

I'm using the Buddy Boss Social Learner Theme for Learndash. Without BuddyPress installed the theme does not work (page content doesn't load). BuddyPress is required for this theme to function. I have all the required settings turned on for this theme to function.

We have moderation settings turned on for our multisite, We've tested on another subsite where the comment notifications and moderation WAS WORKING. As soon as we activated BuddyPress on that site the comment notifications and moderation STOPPED WORKING.

I've turned each plugin off at a time and tested the comments and I've narrowed down the issue to the BuddyPress plugin.

#4 @aleon4
7 years ago

I don't have any blacklist settings either

#5 @aleon4
7 years ago

I'm trying to get commenting to work on pages and LearnDash specific posts. Both areas post automatically - not being held for moderation and notifications are not going through.

#6 @r-a-y
7 years ago

  • Keywords dev-feedback added; reporter-feedback removed
  • Milestone changed from Awaiting Review to Under Consideration
  • Summary changed from Comment Moderation and Notifications to Manual approval for blog post comments is bypassed when replying from BuddyPress activity stream
  • Version set to 2.0

Okay, I can verify the problem.

This is only when you are commenting from the BuddyPress activity stream for a blog post and if your sub-site has "Comment must be manually approved" enabled.

Steps to duplicate:

  1. Install BuddyPress on a network-wide WordPress install.
  2. In the Network Admin dashboard, navigate to "Settings > BuddyPress > Components". Enable "Site Tracking" and save.
  3. In the Network Admin dashboard, navigate to "Settings > BuddyPress > Options". Enable "Allow activity stream commenting on blog and forum posts" and save.
  4. Go to any sub-site's admin dashboard and go to "Settings > Discussion". Check "Comment must be manually approved" and save.
  5. Now login as another user and navigate to the BuddyPress site-wide Activity page and attempt an activity comment on a blog post from that sub-site. If you do not see a blog post activity stream item, create a blog post for testing from the sub-site, then go back to the BuddyPress Activity page and post an activity comment.
  6. Activity stream comment is synced to the sub-site's blog post comment and bypasses manual moderation.

I think for sub-sites that have "Comment must be manually approved" enabled, we should disable activity commenting on these activity entries since there is no way for us replicate the WordPress pending comment experience within the BuddyPress activity stream.

Last edited 7 years ago by r-a-y (previous) (diff)

@r-a-y
7 years ago

Disables activity commenting for sub-sites requiring manual approval for blog comments.

#7 @r-a-y
7 years ago

  • Keywords has-patch added; needs-patch removed

I think for sub-sites that have "Comment must be manually approved" enabled, we should disable activity commenting on these activity entries since there is no way for us replicate the WordPress pending comment experience within the BuddyPress activity stream.

Due to what I mentioned above, 01.patch disables activity commenting in the BuddyPress activity stream for blog comments requiring manual approval.

Users will still able to comment on the original blog post, but will no longer be able to comment within the BuddyPress activity stream.

In order to test this patch, you will need go to your sub-site's "Settings > Discussion" admin page and save. This will mirror the comment_moderation option to BP's blogmeta table so BuddyPress can easily query for this setting in the activity loop later on.

Having to manually save each sub-site's Discussion settings might be a pain. I could automate this, but this might increase the DB query count.

#8 @aleon4
7 years ago

Hi Ray, you mention

"In order to test this patch, you will need go to your sub-site's "Settings > Discussion" admin page and save."

Is there anything I need to change on the Discussion settings admin page before saving?
I implemented the patch, am I suppose to see the comment moderation begin to work or commenting to be disabled?
Thanks.

#9 @r-a-y
7 years ago

I implemented the patch, am I suppose to see the comment moderation begin to work or commenting to be disabled?

Activity commenting will be disabled in the BuddyPress activity stream for sites that have enabled manual approval for comments.

Is there anything I need to change on the Discussion settings admin page before saving?

You shouldn't need to do anything. Just save. If that doesn't work, then toggle the manual approval setting and save and then re-enable the setting and re-save again.

#10 @hnla
7 years ago

@r-a-y surely this relates to those previous tickets doesn't it, and if it does does this not sort of prompt a deeper re-visit, think I left a comment that we'd have to return to this issue of blacklist/moderation.

#11 @aleon4
7 years ago

Ok I understand Buddy Press doesn't support moderation for the activity stream. Is it possible for an admin to receive notifications for every single activity stream post?

#12 @r-a-y
7 years ago

@hnla - Yes, this is related to the initial blog post <-> activity comment synchronization that was implemented in v2.0. This was something that was overlooked on my end.

does this not sort of prompt a deeper re-visit, think I left a comment that we'd have to return to this issue of blacklist/moderation.

View what I wrote here - https://buddypress.trac.wordpress.org/ticket/6719#comment:9
Also see #2786.


Ok I understand Buddy Press doesn't support moderation for the activity stream. Is it possible for an admin to receive notifications for every single activity stream post?

You'll have to code something yourself since that would be custom, but it's entirely possible.

#13 @r-a-y
7 years ago

  • Component changed from Activity to Blogs
  • Milestone changed from Under Consideration to 3.0

Moving to 3.0.

#14 @hnla
7 years ago

View what I wrote here - https://buddypress.trac.wordpress.org/ticket/6719#comment:9

Yep needed to re-read the whole ticket carefully to re-familiarise myself with the whole thing.

#15 @DJPaul
7 years ago

  • Keywords commit added

Patch looks good @r-a-y :)

Do you want to commit it to trunk?

This ticket was mentioned in Slack in #buddypress by djpaul. View the logs.


6 years ago

This ticket was mentioned in Slack in #buddypress by djpaul. View the logs.


6 years ago

#18 @r-a-y
6 years ago

  • Owner set to r-a-y
  • Resolution set to fixed
  • Status changed from new to closed

In 11788:

Blogs: Disable activity commenting for blog items requiring manual approval.

For sites that have the "Comment must be manually approved" option enabled,
we are disabling activity commenting for these activity entries since there
is currently no way for us to replicate the WordPress pending comment
experience within the BuddyPress activity stream.

Users will still be able to comment on the original blog post, but will no
longer be able to comment within the BuddyPress activity stream.

Hat-tip aleon4 for reporting this issue.

Fixes #7592.

Note: See TracTickets for help on using tickets.