https://redmine.gc.cuny.edu/https://redmine.gc.cuny.edu/favicon.ico2014-05-22T02:31:53ZCUNY Graduate Center - Project Tracking SystemCUNY Academic Commons - Bug #3219: new_groupblog_post emails not being sent as HTMLhttps://redmine.gc.cuny.edu/issues/3219?journal_id=154532014-05-22T02:31:53ZBoone Gorgesboone@gorg.es
<ul><li><strong>Target version</strong> set to <i>1.6.5</i></li><li><strong>Estimated time</strong> set to <i>1.00 h</i></li></ul> CUNY Academic Commons - Bug #3219: new_groupblog_post emails not being sent as HTMLhttps://redmine.gc.cuny.edu/issues/3219?journal_id=155292014-06-02T00:29:21ZBoone Gorgesboone@gorg.es
<ul><li><strong>Target version</strong> changed from <i>1.6.5</i> to <i>1.6.6</i></li></ul> CUNY Academic Commons - Bug #3219: new_groupblog_post emails not being sent as HTMLhttps://redmine.gc.cuny.edu/issues/3219?journal_id=156302014-06-12T00:48:18ZBoone Gorgesboone@gorg.es
<ul><li><strong>Subject</strong> changed from <i>HTML email notifications for activity items</i> to <i>new_groupblog_post emails not being sent as HTML</i></li><li><strong>Target version</strong> changed from <i>1.6.6</i> to <i>1.6.7</i></li></ul><p>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.</p>
<p>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.</p>
<p>The second screenshot appears to be an unrelated problem. I will open a separate ticket.</p> CUNY Academic Commons - Bug #3219: new_groupblog_post emails not being sent as HTMLhttps://redmine.gc.cuny.edu/issues/3219?journal_id=156312014-06-12T00:50:41ZMatt Goldmattgold@gmail.com
<ul></ul><p>Thanks for figuring this out, Boone.</p> CUNY Academic Commons - Bug #3219: new_groupblog_post emails not being sent as HTMLhttps://redmine.gc.cuny.edu/issues/3219?journal_id=156452014-06-12T01:48:54ZRaymond Hoh
<ul></ul><blockquote>
<p>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.)</p>
</blockquote>
<p>Hmm, this is interesting to solve. I think you have the right idea, Boone.</p>
<p>These are the few things I'm thinking of off the top of my head:</p>
<ul>
<li>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.</li>
<li>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.</li>
</ul> CUNY Academic Commons - Bug #3219: new_groupblog_post emails not being sent as HTMLhttps://redmine.gc.cuny.edu/issues/3219?journal_id=156642014-06-13T17:38:44ZBoone Gorgesboone@gorg.es
<ul><li><strong>Assignee</strong> changed from <i>Boone Gorges</i> to <i>Raymond Hoh</i></li></ul><blockquote>
<p>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.</p>
</blockquote>
<p>I think it's just groupblog.</p>
<blockquote>
<p>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.</p>
</blockquote>
<p>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.</p>
<p>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.</p> CUNY Academic Commons - Bug #3219: new_groupblog_post emails not being sent as HTMLhttps://redmine.gc.cuny.edu/issues/3219?journal_id=157052014-06-22T01:27:18ZBoone Gorgesboone@gorg.es
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Resolved</i></li></ul><p>Should be fixed by <a class="external" href="https://github.com/castiron/cac/commit/a8868e7d4a5beecebd27eabb7549e11418f2c3c7">https://github.com/castiron/cac/commit/a8868e7d4a5beecebd27eabb7549e11418f2c3c7</a>. Thanks, Ray!</p> CUNY Academic Commons - Bug #3219: new_groupblog_post emails not being sent as HTMLhttps://redmine.gc.cuny.edu/issues/3219?journal_id=157142014-06-23T12:36:52ZMatt Goldmattgold@gmail.com
<ul></ul><p>Thank you, Ray!</p>