[buddypress-trac] [BuddyPress Trac] #5557: BP_Group_Extension settings_screen_save

buddypress-trac noreply at wordpress.org
Sun Aug 17 18:05:30 UTC 2014


#5557: BP_Group_Extension settings_screen_save
-------------------------+------------------
 Reporter:  dcavins      |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  low          |   Milestone:  2.1
Component:  Groups       |     Version:
 Severity:  minor        |  Resolution:
 Keywords:  needs-patch  |
-------------------------+------------------
Changes (by boonebgorges):

 * milestone:  2.2 => 2.1


Comment:

 Just coming back around to this. It turns out that the patch is actually
 quite simple. Basically, we have to account for three possibilities:

 1. The group extension handles the redirect on its own, and calls `die;`
 afterward. In this case, our proposed redirect would never be called,
 since we'd put it in `call_edit_screen_save()`, after the
 'screen_save_callback' had been invoked.
 2. The group extension does not do any redirect. In this case, our
 proposed redirect would kick in.
 3. The group extension handles a redirect, but does *not* die afterward.
 This is the only tricky case, because doing a double redirect has the
 potential to break various things (like the bp_core_add_message() items
 that are intended to be displayed on the next pageload).

 However, I did some tests using a simple plugin that falls into category
 3, and found that the redirect was actually completing and halting the
 pageload before the BP_Group_Extension redirect was hit. So I think that 3
 actually is the same as 1 for all intents and purposes.

 That said, there could be a difference in this redirect behavior in some
 edge cases, so it's still worth having a failsafe. Because this is
 straightforward, I'm going to go ahead and sneak it back into 2.1.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5557#comment:7>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list