Skip to:
Content

BuddyPress.org

Opened 11 years ago

Closed 11 years ago

#5364 closed defect (bug) (fixed)

Collapsible feature is not working in component single item administration screens

Reported by: imath's profile imath Owned by: imath's profile imath
Milestone: 2.0 Priority: low
Severity: normal Version: 1.9.1
Component: Administration Keywords: has-patch commit
Cc:

Description

Sarah (@pollyplummer) alerted me that the collapsible feature was not working on the new "Community Profile" administration screen. I remembered same behavior was happening in single Group Administration screen and in single Activity Administration screen.

I've dived a little in WordPress javascripts we are enqueueing to benefit from this feature. And i've found that the problem was linked to the script comment.js. We enqueue it in Groups single item, Activity single item and Community profile.

comment.js uses this function postboxes.add_postbox_toggles('comment'); and as a result the page argument of the save state function is "comment" instead of the right administration page id.

I think Groups single item and Community profile doesn't need this script, so we might simply avoid enqueueing it to make the collapsible feature work (+ user options saved).

Activity single item Administration screen needs it in order to change the date of the activity. Hopefully the admin.js of this component is loaded after comment.js so we can rerun the postboxes.add_postbox_toggles in favor of the right administration page id.

That's what i've attached in the patch. I've tested and it seems to solve the trouble : collapsible works and the states are saved.

Attachments (1)

5364.diff (6.7 KB) - added by imath 11 years ago.

Download all attachments as: .zip

Change History (6)

@imath
11 years ago

#1 @boonebgorges
11 years ago

This seems good to me.

#2 @hnla
11 years ago

Patched as well and it seems fine.

Last edited 11 years ago by hnla (previous) (diff)

This ticket was mentioned in IRC in #buddypress-dev by imathfromparis. View the logs.


11 years ago

#4 @johnjamesjacoby
11 years ago

  • Keywords commit added; 2nd-opinion removed

Works here. Have at it.

#5 @imath
11 years ago

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

In 8030:

Ensures metaboxes are collapsible in various Administration screens

When editing an activity, editing a group or editing a profile from the corresponding WordPress Administration screens, metaboxes are now fully collapsible.

Fixes #5364

Note: See TracTickets for help on using tickets.