Skip to:
Content

BuddyPress.org

Opened 12 years ago

Last modified 7 years ago

#4784 reopened defect (bug)

Site Page Comments Don't Reach Activity

Reported by: clivoo's profile clivoo Owned by: djpaul's profile djpaul
Milestone: Awaiting Contributions Priority: normal
Severity: normal Version:
Component: Activity Keywords:
Cc:

Description

I had BP working fine until I updated to latest BP and WP. I then lost all of my Activity comments from my blogs. I tried disabling plugins etc, reverting to buddypress default theme – nothing gives. I’ve done fresh installs on different servers with the same problem.

I think I’ve isolated the problem. Comments on PAGES don't seem to be being added to the Activity stream. All of my recent comments are comments to pages NOT TO POSTS. If I comment to a page it doesn’t appear, if I comment to an old post it does.

Also, network update doesn't add page originated comments either.

I think this happened with 16.0 but it might have been 1.6.1

Attachments (2)

4784.patch (1.6 KB) - added by ketuchetan 8 years ago.
4784.2.patch (643 bytes) - added by ketuchetan 8 years ago.
Added second one if the first is wrong.

Download all attachments as: .zip

Change History (22)

#1 @clivoo
12 years ago

  • Component changed from Core to Activity

#2 @r-a-y
12 years ago

By default, BP only records post comments into the activity stream.

To expand this to the 'page' post type, you might want to look at the code snippet in #4106.

Here's something to try in wp-content/plugins/bp-custom.php:

function bp_ticket_4784_record_custom_comment_post_types($cpts) {
   $cpts[] = 'page';

   return $cpts;
}
add_filter( 'bp_blogs_record_comment_post_types', 'bp_ticket_4784_record_custom_comment_post_types' );

Untested, but give it a shot.

#3 @DJPaul
12 years ago

  • Milestone changed from Awaiting Review to Future Release

Not entirely sure why we don't let page comments into the Activity stream?

#4 @slaFFik
8 years ago

  • Keywords needs-patch good-first-bug added
  • Milestone changed from Future Release to 2.8
  • Severity changed from major to normal
  • Version 1.6 deleted

Comments to default WordPress pages are still not tracked. I propose to include them by default.
Developers can easily filter them out if not needed.

Last edited 8 years ago by slaFFik (previous) (diff)

#5 @boonebgorges
8 years ago

Previously: #3455, [4959]

The default set of post types for recording *post* activity and *comment* activity should be the same. I think it would be bad default behavior if page comments were posted to the activity stream, but pages themselves were not.

Recording 'page' data by default seems OK to me.

#6 @CliveSoulHeal
8 years ago

I posted the original 'complaint' at the top I use PAGES and I'd been using pages with my comments coming to the BP stream for years and years then it stopped. So, "I think it would be bad default behavior if page comments were posted to the activity stream" i.e. suddenly changing (in my terms) basic functioning that I relied on for years is extremely bad policy.

Just to remind you on every PAGE 'page' you are asked if you want commenting enabled, you can tick to have comments active. So, if anyone thinks that ticked comments on a page should NOT appear in the BP activity stream then you should also add in a TICK box asking if they want page comments to NOT BE POSTED (NOT the other way around which would require me to manually activate for literally 1000's of pages).

The "bp-custom.php" work around worked for me (thanks r-a-y) so I don't want anything that would cause that work around to 'NOW' NOT WORK once again in the future.

Version 0, edited 8 years ago by CliveSoulHeal (next)

#7 @boonebgorges
8 years ago

Hi @CliveSoulHeal - I agree that we should not have changed the behavior, at least not without a warning. This was an oversight and an error in BP 1.6. Apologies on behalf of the BP team if it caused problems on your site.

The "bp-custom.php" work around worked for me (thanks r-a-y) so I don't want anything that would cause that work around to 'NOW' NOT WORK once again in the future.

Right. What's being suggested here is, essentially, to have your bp-custom.php behavior be the default.

#8 @CliveSoulHeal
8 years ago

That would be great for me @boonebgorges the only problem I can see is that some people will be relying on not having page comments appearing in the activity i.e. as it is now comments on pages would be sort of private / hidden? So, they'd suddenly find page comments appearing in the AS that they didn't want seen in public.

So, the best option would be to add a setting to the BP admin 'settings' page to switch adding page comments to the activity stream on or off? With the default as it is now?

#9 @ketuchetan
8 years ago

  • Keywords has-patch added; needs-patch removed

I have added 4784 patch.

Please review it and let me know if any changes on that.

Thanks,

@ketuchetan
8 years ago

@ketuchetan
8 years ago

Added second one if the first is wrong.

#10 @DJPaul
8 years ago

@ketuchetan The second patch looks correct. Did you test it?

If you didn't, here's what I'd expect: on your test site, enable *all* BuddyPress components, then publish a blog *post*. Comment on that blog post, then visit the Activity page. You should see your comment in the Activity Stream.

Then, do the same but publish a *page*, and comment on that. Before the patch, the comment should not appear in the Activity Stream, and after the patch, the comment should appear.

#11 @chiragpatel
8 years ago

Hello @ketuchetan and @DJPaul,

I have tested this patch with below scenario:

Wordpress 4.7
Buddypress 2.7.3

I applied the code changes then I created a sample page and post the comment in reply but I can not see any comment in activity page.

Thanks,

#12 @ketuchetan
8 years ago

@DJPaul Can you please check once from your end it's working with you or not?

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


8 years ago

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


8 years ago

#15 @DJPaul
8 years ago

  • Keywords early added
  • Milestone changed from 2.8 to 2.9

#16 @Strothi
8 years ago

  • Keywords changed from good-first-bug, has-patch, early to good-first-bug has-patch early

Hey guys,

I've tested the initial code by @r-a-y as well as the proposed patches by @ketuchetan, but it doesn't seem to work. I realize that this seems to be scheduled for 2.9 release, but if you could point me to a solution in the meantime, I'd highly appreciate it!

Thanks so much in advance!

#17 @hnla
8 years ago

  • Milestone changed from 2.9 to 3.0

#18 @DJPaul
8 years ago

  • Keywords good-first-bug has-patch early removed

#19 @djpaul
7 years ago

  • Owner set to djpaul
  • Resolution set to fixed
  • Status changed from new to closed

In 11794:

Blogs: track Pages (post type) and comments in the activity stream.

Tracking Pages' comments in the Activity Stream used to be the default behaviour until a regression first introduced in BP 1.6(!).
This change now tracks Pages in the stream by default, and Page comments if a specific Page is set to allow comments.

Fixes #4784

Props ketuchetan for the initial patch.

#20 @DJPaul
7 years ago

  • Milestone changed from 3.0 to Future Release
  • Resolution fixed deleted
  • Status changed from closed to reopened

r11799 reverts this. Something odd going on with unit tests, this needs investigation.

Note: See TracTickets for help on using tickets.