Project

General

Profile

Actions

Bug #15677

closed

Duplicate email template posts are being created during a BuddyPress upgrade

Added by Raymond Hoh about 2 years ago. Updated almost 2 years ago.

Status:
Resolved
Priority name:
Normal
Assignee:
Category name:
BuddyPress (misc)
Target version:
Start date:
2022-03-19
Due date:
% Done:

0%

Estimated time:
Deployment actions:

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

Related to CUNY Academic Commons - Feature #15675: Group Email Subject line editResolvedRaymond Hoh2022-03-18

Actions
Related to CUNY Academic Commons - Feature #15883: Release BPGES updateResolvedBoone Gorges2022-04-08

Actions
Related to CUNY Academic Commons - Bug #18051: subject lines for commons messages ResolvedRaymond Hoh2023-04-17

Actions
Actions #1

Updated by Raymond Hoh about 2 years ago

Actions #2

Updated by Raymond Hoh about 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

Actions #3

Updated by Colin McDonald about 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!

Actions #4

Updated by Boone Gorges about 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?

Actions #5

Updated by Raymond Hoh about 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.

Actions #6

Updated by Boone Gorges about 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.

Actions #7

Updated by Boone Gorges about 2 years ago

Actions #8

Updated by Boone Gorges almost 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.

Actions #9

Updated by Boone Gorges almost 2 years ago

  • Status changed from Staged for Production Release to Resolved
Actions #10

Updated by Raymond Hoh almost 1 year ago

  • Related to Bug #18051: subject lines for commons messages added
Actions

Also available in: Atom PDF