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 | 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)
Change History (8)
#3
@
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.
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 );