Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Bug when editing BP Album activity items from the Activity dashboard. #1

Closed
rossagrant opened this Issue · 8 comments

4 participants

@rossagrant

Just a heads up to a bug I found in BuddyPress/ BP Media when editing activity items from the backend of WP.

When you upadte/ edit a BP Album activity item, the formatting on the stream goes out.

It's all to do with registering activity items early enough.

Here's the link to my original BuddyPressTRAC ticket with screencast:

http://buddypress.trac.wordpress.org/ticket/4786

You'll see r-a-y has a patch to fix the BB Press issue, which will be a very similar patch for BP Media I'm guessing.

Here's the BBPress patch:

http://bbpress.trac.wordpress.org/ticket/2176

Let me know what you guys think.

The screencast shows the bug with BBPress but BP Media suffers the same with its activity items after editing.

@foxly foxly was assigned
@foxly
Owner

In progress.

@foxly
Owner

Based on our testing, this is an internal problem with BuddyPress.

The call chain is as follows:

bpa.core.php, line 734: bp_album_record_activity()
bpa.core.php, line 789: bp_activity_add()

...at which point we hand off to BuddyPress.

^F^

@foxly foxly closed this
@r-a-y

Hi foxly,

The BP Activity dashboard relies on activity actions being registered with BP.

Looking at bpa.core.php, I couldn't find any reference to BP Album registering any activity actions.

FYI, as a point of reference, bbPress does it here:
https://bbpress.trac.wordpress.org/browser/tags/2.2.3/includes/extend/buddypress/activity.php#L231

Let me know if you have any questions.

Update - Also check out my post on the BP ticket for further info:
https://buddypress.trac.wordpress.org/ticket/4786#comment:8

@foxly
Owner

Thanks for the tip.

So what that means is, we now need to hook into a new action for compatibility with the BP activity editor screen?

@foxly foxly reopened this
@r-a-y

So what that means is, we now need to hook into a new action for compatibility with the BP activity editor screen?

Yes, that's right at least in the current codebase.

Something to the effect of the following in bpa.core.php should work:

/**
 * bp_album_register_activity_actions()
 *
 * Registers BP-Album's activity actions with BuddyPress.
 * Needed for validation on the Activity dashboard screen in the WP admin area.
 *
 * @version x
 * @since x
 */
function bp_album_register_activity_actions() {
    global $bp;

    bp_activity_set_action( $bp->album->id, 'bp_album_picture', __( 'New picture uploaded', 'bp-album' ) );
    // register any additional activity actions here
}
add_action( 'bp_register_activity_actions', 'bp_album_register_activity_actions' );

To see if that worked, do a dump of $bp->activity->actions at a late hook like 'get_header'.

@rossagrant can also help with testing to see if this code snippet works.

Let me know if that addresses things.

@rossagrant

Yep, I'll gladly help if you want me to try anything out. When you know exactly what code you want to try, let me know where to paste it and I'll test it all out.

@foxly
Owner

Allright, I'll start the build on this in 3 or 4 hours. It's so awesome when everyone teams up on defects like this. I probably wouldn't have caught this one on my own ... :)

@fanquake
Collaborator

@rossagrant Would you be able to reopen your ticket on this repository https://github.com/bp-album/bp-album

Bp-Album is being shifted over to it.

Thanks

@fanquake fanquake closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.