Bug #3219
closed
new_groupblog_post emails not being sent as HTML
Added by Matt Gold over 10 years ago.
Updated over 10 years ago.
Category name:
BuddyPress (misc)
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
- Target version set to 1.6.5
- Estimated time set to 1.00 h
- Target version changed from 1.6.5 to 1.6.6
- 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.
Thanks for figuring this out, Boone.
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.
- 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.
- Status changed from Assigned to Resolved
Also available in: Atom
PDF