Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate emails #6

Closed
r-a-y opened this issue Dec 29, 2011 · 15 comments
Closed

Duplicate emails #6

r-a-y opened this issue Dec 29, 2011 · 15 comments

Comments

@r-a-y
Copy link
Collaborator

r-a-y commented Dec 29, 2011

View the following thread for the original report and suggested fix:
http://wordpress.org/support/topic/plugin-buddypress-group-email-subscription-duplicates

I haven't tested the fix yet, but have experienced the same issue.

@r-a-y
Copy link
Collaborator Author

r-a-y commented Feb 5, 2012

Okay, did some debugging for this.

Turns out to be a BP problem in v1.5:
http://buddypress.trac.wordpress.org/ticket/3980

The at-mention filter causes the activity to be saved twice and thus, the "bp_activity_after_save" hook will run twice causing the duplicate emails.

Going to try and think of a workaround.

[EDIT]
I think chriswhittle's idea of using the bbPress hook -- "bb_new_post" -- instead of the "bp_activity_after_save" hook is valid and more reliable when detecting new forum posts vs forum post edits. Could probably remove the hack ass_item_is_new() function as well. Will take a look.

[EDIT 2]
While I was looking at that bbPress hook, I forgot that bbPress 1.1 included some form of email subscription! (Double rainbow!) Might look into building a frontend so BuddyPress group forums can take advantage of that!

@dwenaus
Copy link
Collaborator

dwenaus commented Feb 7, 2012

using a bb hook would require a major re-write of the code, because all the email functions rely on the activity action, links, title, etc.

@r-a-y
Copy link
Collaborator Author

r-a-y commented Feb 7, 2012

Chris Whittle's idea works.

Emails are no longer duplicated.

I've taken his code and cleaned it up, as well as added extra clarification in the email footer regarding why a person is being sent an email.

eg. You're receiving notifications because you are either:

  • Manually following the topic
  • Started a topic and want all subsequent replies
  • Replied to a topic and want all subsequent replies

Before the email footer additions, it was kind of vague why a user was receiving emails all the time even though the user had set up groups to use only the "New Topics" option.

I haven't tested digest functions with this yet though, but expect a pull request in the coming week.

@defunctl
Copy link

Hey Ray,

Where did you put the cleaned up/clarified code?

@cwhittl
Copy link

cwhittl commented May 4, 2012

Please share! It's still an issue in the new one.

@r-a-y
Copy link
Collaborator Author

r-a-y commented May 18, 2012

@defunctl @cwhittl My changes for the Group Email plugin were successfully merged into the master branch:
https://github.com/boonebgorges/buddypress-group-email-subscription/zipball/master

The group forum code has been refactored a fair bit so it could use some testers! Please test and give your feedback before Boone and Deryk can decide on releasing the newest update.

@cwhittl
Copy link

cwhittl commented May 18, 2012

Got it on the site now... We'll let you know if we have any issues!

@defunctl
Copy link

defunctl commented Jun 8, 2012

@r-a-y installed and testing. I noticed one problem with all versions is that if you started a thread and a user replies, you get a notification that allows you disable all notifications for that group. If you click on that, it changes your status properly to No Email, but you still get reply notifications.

Any idea why?

@r-a-y
Copy link
Collaborator Author

r-a-y commented Jun 8, 2012

@defunctl I did not test the "disable notifications for this group" feature, but I believe I know what you're experiencing.

Group email settings are different than your individual email notification settings.

Navigate to your profile and then click on "Settings" followed by "Notifications". Scroll down and find the "Group Forum" header and please list your settings. Also, can you list down the group email setting as well as the entire email footer that you were sent?

I have some ideas, but I just want some confirmation from you before I proceed.

@defunctl
Copy link

defunctl commented Jun 8, 2012

Ahh I see, both "A member replies after you in a forum topic" and "A member replies in a forum topic you've started" are checked yes. I wonder if there is a way to turn that off for certain groups.

Thanks @r-a-y

@defunctl
Copy link

defunctl commented Jul 4, 2012

Well so far unsubscribe isn't working. Not sure if this is a w3 total cache issue or not, but I still get digests, and when I unsubscribe it says it works, but it never actually does. I just keep getting the digests. This goes for clicking on the link for both the specific group and to unsubscribe from all.

Any idea @r-a-y

@boonebgorges
Copy link
Owner

I unsubscribe it says it works

Can you be more specific? What are you doing to unsubscribe? In the group header, are you seeing "Current status: No email"?

@defunctl
Copy link

defunctl commented Jul 4, 2012

Sure. I am no longer a member of the group where I keep getting digests.

For example, when I get the email and have this link: http://xxxxx.com/members/xxx/?bpass-action=unsubscribe&access_key=KEY_WAS_HERE to unsubscribe from all, or just for the group: http://xxxxxx.com/members/xxx/?bpass-action=unsubscribe&group=334&access_key=KEY_WAS_HERE

@boonebgorges
Copy link
Owner

Hm. It's possible that those links won't work if you're no longer a
member of the group. How did you leave the group in the first place?

On 7/4/12 9:17 AM, defunctl wrote:

Sure. I am no longer a member of the group where I keep getting digests.

For example, when I get the email and have this link: http://xxxxx.com/members/xxx/?bpass-action=unsubscribe&access_key=KEY_WAS_HERE to unsubscribe from all, or just for the group: http://xxxxxx.com/members/xxx/?bpass-action=unsubscribe&group=334&access_key=KEY_WAS_HERE


Reply to this email directly or view it on GitHub:
#6 (comment)

@defunctl
Copy link

defunctl commented Jul 4, 2012

Just clicked the leave group button on the group. I'll join it again and try the links again and let you know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants