Skip to:
Content

BuddyPress.org

Opened 13 years ago

Closed 13 years ago

#3354 closed defect (bug) (fixed)

Activity comments with embed links don't show on initial AJAX load

Reported by: djpaul's profile DJPaul Owned by:
Milestone: 1.5 Priority: normal
Severity: Version: 1.5
Component: Core Keywords: has-patch
Cc:

Description

When posting, for example, a youtube link into an activity stream comment (or a status update), the AJAX returns the plain text version of the link. When the page is refreshed, the embed is loaded.

This is because DTheme's ajax implementation seems to happen before the bp_init hook is fired. If you hard-code a call to bp_embed_init() in the ajax handler, it fixes this problem. However, if you're posting a status update, there is also some javascript to copy your most recent activity into span.activity in the member header... it copies the html from the ajax response, so you also get a youtube box in there.

I've put this ticket to 1.4 as I can't see an easy way around it as it seems its caused by DTheme 1.3's javascript. Re-hooking all the AJAX calls is too big a task for the 1.3 beta release.

Attachments (2)

3354.01.patch (407 bytes) - added by r-a-y 13 years ago.
3354.02.patch (3.5 KB) - added by r-a-y 13 years ago.

Download all attachments as: .zip

Change History (8)

#1 @r-a-y
13 years ago

This used to work on an earlier version of BP 1.3-bleeding as-is.

However, in current trunk, you can fix this by changing the priority of bp_embed_init() to 9:

add_action( 'bp_init', 'bp_embed_init', 9 );

@r-a-y
13 years ago

#2 @r-a-y
13 years ago

  • Keywords has-patch added

#3 @DJPaul
13 years ago

Yes, but, as per the ticket description:

However, if you're posting a status update, there is also some javascript to copy your most recent activity into span.activity in the member header... it copies the html from the ajax response, so you also get a youtube box in there.

See http://i52.tinypic.com/8wze48.png

@r-a-y
13 years ago

#4 @r-a-y
13 years ago

Ahh okay, gotcha!

The attached patch uses .text() instead of .html() for the AJAX #latest-update.
I've also localized the "View" link.

#5 @DJPaul
13 years ago

  • Milestone changed from 1.4 to 1.3

#6 @djpaul
13 years ago

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

(In [4727]) Fix oembed activity comments when posting with AJAX. Fixes #3354, props r-a-y

Note: See TracTickets for help on using tickets.