Bug #15677
closedDuplicate email template posts are being created during a BuddyPress upgrade
0%
Description
See https://redmine.gc.cuny.edu/issues/15675#note-3.
Duplicate email templates are being created whenever a BuddyPress DB update is required (I'm guessing).
The Group Email Subscription plugin has some logic to determine whether a new email template should be created or not: https://github.com/boonebgorges/buddypress-group-email-subscription/blob/d322c0bfb053b9ee23d1e25a250717d1e506313a/admin.php#L398. But judging by the other duplicate BuddyPress email templates that were also created, it's probably caused by something else.
Related issues
Updated by Raymond Hoh over 2 years ago
- Related to Feature #15675: Group Email Subject line edit added
Updated by Raymond Hoh over 2 years ago
Boone, I took a closer look at GES and it looks like the post type exists check defaults to false
when installing the email templates: https://github.com/boonebgorges/buddypress-group-email-subscription/blob/d322c0bfb053b9ee23d1e25a250717d1e506313a/admin.php#L386. Since ass_install_emails()
is hooked to 'bp_core_install_emails'
, it runs whenever BuddyPress (or another plugin) calls bp_core_install_emails()
. BuddyPress has used this function in their updater over the past couple of major releases, which has resulted in the duplicate GES email templates.
I've added a PR for your review here: https://github.com/boonebgorges/buddypress-group-email-subscription/pull/221
Updated by Colin McDonald over 2 years ago
Just adding Boone and Matt as watchers here to make sure we get the right eyes reviewing this for you Ray before we move ahead. Thanks!
Updated by Boone Gorges over 2 years ago
I've merged the PR in the BPGES repo. Ray, should I do a BPGES release, or can we apply this directly to the Commons?
Updated by Raymond Hoh over 2 years ago
It would be good to do a general BPGES release before the next major BuddyPress release, but for our purposes, we can patch our current version of BPGES now. I'll patch up BPGES later today.
Updated by Boone Gorges over 2 years ago
Sounds good - I'm going to open a separate ticket so I don't forget to release BPGES in the upcoming weeks.
Updated by Boone Gorges over 2 years ago
- Related to Feature #15883: Release BPGES update added
Updated by Boone Gorges over 2 years ago
- Status changed from New to Staged for Production Release
In https://github.com/cuny-academic-commons/cac/commit/73c34c545bfd64ea7c0f781d321d3344f42b2b8d I've updated the Commons to the latest 4.0.x branch of the BPGES repo, which includes this fix.
Updated by Boone Gorges over 2 years ago
- Status changed from Staged for Production Release to Resolved
Updated by Raymond Hoh over 1 year ago
- Related to Bug #18051: subject lines for commons messages added