Project

General

Profile

Actions

Bug #3219

closed

new_groupblog_post emails not being sent as HTML

Added by Matt Gold almost 10 years ago. Updated almost 10 years ago.

Status:
Resolved
Priority name:
Normal
Assignee:
Category name:
BuddyPress (misc)
Target version:
Start date:
2014-05-20
Due date:
% Done:

0%

Estimated time:
1.00 h
Deployment actions:

Description

Hi Boone -- George noticed that HTML notifications for activity items are not using HTML email. Please see a screenshot attached for this post.

Incidentally, it looks like there might be an error in the notification itself -- note the repeated "disable notifications" message at the bottom in the second screenshot


Files

Actions #1

Updated by Boone Gorges almost 10 years ago

  • Target version set to 1.6.5
  • Estimated time set to 1.00 h
Actions #2

Updated by Boone Gorges almost 10 years ago

  • Target version changed from 1.6.5 to 1.6.6
Actions #3

Updated by Boone Gorges almost 10 years ago

  • Subject changed from HTML email notifications for activity items to new_groupblog_post emails not being sent as HTML
  • Target version changed from 1.6.6 to 1.6.7

I've investigated this some more. The root cause is that blog posts are published from the non-root blog, and WP Better Emails (and the BP addon) are only active on the root blog. The problem with network activation is that it'd run every email on the whole network through the email templates, which I don't think we want to do.

I think the answer is to network activate both plugins, but to add some sort of check to wp-better-emails-for-bp (or to a custom CAC file) that will disable WP Better Emails for outgoing emails on the non-root blog, unless the email originates from a BP activity item. (Maybe: unhook the mail wp_mail filter, then rehook it on 'bp_activity_before_save' or something like that.) This needs investigation. Ray, I'm adding you as a watcher in case you have some thoughts.

The second screenshot appears to be an unrelated problem. I will open a separate ticket.

Actions #4

Updated by Matt Gold almost 10 years ago

Thanks for figuring this out, Boone.

Actions #5

Updated by Raymond Hoh almost 10 years ago

I think the answer is to network activate both plugins, but to add some sort of check to wp-better-emails-for-bp (or to a custom CAC file) that will disable WP Better Emails for outgoing emails on the non-root blog, unless the email originates from a BP activity item. (Maybe: unhook the mail wp_mail filter, then rehook it on 'bp_activity_before_save' or something like that.)

Hmm, this is interesting to solve. I think you have the right idea, Boone.

These are the few things I'm thinking of off the top of my head:

  • Are there any non-root-blog emails other than Groupblog content that will need the HTML email template? I'm guessing not. If not, this will make things a little easier.
  • Groupblog emails will need to use the same wp-better-emails HTML template as the one on the BP root blog. I don't think that wp-better-emails uses a sitewide option. We'll probably need to add some filters to wp-better-emails, so we can call the root blog's email template when an email is fired from a non-root blog.
Actions #6

Updated by Boone Gorges almost 10 years ago

  • Assignee changed from Boone Gorges to Raymond Hoh

Are there any non-root-blog emails other than Groupblog content that will need the HTML email template? I'm guessing not. If not, this will make things a little easier.

I think it's just groupblog.

Groupblog emails will need to use the same wp-better-emails HTML template as the one on the BP root blog. I don't think that wp-better-emails uses a sitewide option. We'll probably need to add some filters to wp-better-emails, so we can call the root blog's email template when an email is fired from a non-root blog.

Good call - I hadn't thought of that. I don't see any specific filters in WPBE for this purpose, but a filter on 'option_wpbe_options' is probably good enough. switch_to_blog() will be fine for our purposes.

Ray - If you don't mind, I'm going to reassign this to you. If you can't get to it in the next week or so, I'll try to tackle it myself before 1.6.7 on the 21st.

Actions #7

Updated by Boone Gorges almost 10 years ago

  • Status changed from Assigned to Resolved
Actions #8

Updated by Matt Gold almost 10 years ago

Thank you, Ray!

Actions

Also available in: Atom PDF