[buddypress-trac] [BuddyPress Trac] #7055: Emails: Attempting to use bp_send_mail() on non-root blogs fails

buddypress-trac noreply at wordpress.org
Fri May 6 18:55:39 UTC 2016


#7055: Emails: Attempting to use bp_send_mail() on non-root blogs fails
--------------------------+--------------------------
 Reporter:  r-a-y         |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  2.6
Component:  API - Emails  |    Version:  2.5.0
 Severity:  normal        |   Keywords:  dev-feedback
--------------------------+--------------------------
 When a dev tries to use `bp_send_email()` on a non-root blog,
 `bp_send_email()` will fail.

 In `bp_send_email()`, we attempt to use `switch_to_blog()` to tell
 WordPress to use all BP root blog settings, however `switch_to_blog()`
 doesn't work that way, it only switches the WPDB DB prefixes.

 See #WP20541 for more details.

 To remedy this, we need to register the email type taxonomy ''even'' on
 non-root blogs.

 I'm currently working around this by registering the email type taxonomy
 only on the blog in question and on `$_POST` requests to limit the
 exposure of the email taxonomy type.

 Putting this in 2.6 since I don't think we can engineer a good solution
 before 2.5.3.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7055>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list