Multiple email notifications for topic subscriptions

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
wfarrell
Registered User
Posts: 27
Joined: Sat Jun 25, 2016 12:23 pm

Multiple email notifications for topic subscriptions

Post by wfarrell » Tue Jul 04, 2017 9:27 pm

I have one user who, when subscribed to a topic, gets an email for every post to the topic whether she has visited the topic or not. As far as I know that is incorrect, and until she visits the topic she should not receive another email notification. It works as expected for me, and no one else has mentioned seeing this behavior, but she gets multiple notifications. It seems to happen for any topic she has subscribed to.

Any idea on why that might happen? Anything I should look for in the database? I'll be digging into the phpBB code soon, but figured I'd ask here first. (This is new since our upgrade from 3.0.14 to 3.2.0.)

[Edit: A second user has mentioned that they see this same problem.]
--
Walt

User avatar
Mick
Support Team Member
Support Team Member
Posts: 21156
Joined: Fri Aug 29, 2008 9:49 am
Location: Watching cricket - definitely

Re: Multiple email notifications for topic subscriptions

Post by Mick » Wed Jul 05, 2017 10:45 am

First ask the user to check his/her notifications/email settings by clicking "Notifications" in the top right side of the board and the "Settings" link, there's an entry for "Someone replies to a topic to which you are subscribed".
"The more connected we get the more alone we become" - Kyle Broflovski

wfarrell
Registered User
Posts: 27
Joined: Sat Jun 25, 2016 12:23 pm

Re: Multiple email notifications for topic subscriptions

Post by wfarrell » Wed Jul 05, 2017 1:30 pm

Thanks, Mick. Yes, they have that notification enabled. But topic-reply notifications are supposed to occur only once, no matter how many posts are made to a topic, until you visit that topic again to read them. That's even what the notification message says:
This topic has received a reply by <username> since your last visit. No more notifications will be sent until you visit the topic.
But that's not how the notifications are working for these users. They are getting notifications for every post made to (at least some of) the topics they're subscribed to.
--
Walt

User avatar
Mick
Support Team Member
Support Team Member
Posts: 21156
Joined: Fri Aug 29, 2008 9:49 am
Location: Watching cricket - definitely

Re: Multiple email notifications for topic subscriptions

Post by Mick » Wed Jul 05, 2017 6:04 pm

Please fill out the Support Request Template and post it back here to enable us to assist you better.
"The more connected we get the more alone we become" - Kyle Broflovski

wfarrell
Registered User
Posts: 27
Joined: Sat Jun 25, 2016 12:23 pm

Re: Multiple email notifications for topic subscriptions

Post by wfarrell » Thu Jul 06, 2017 12:51 am

Support Request Template
What version of phpBB are you using? phpBB 3.2.0
What is your board's URL? https://www.pgdp.net/phpBB3
Who do you host your board with? Ourselves
How did you install your board? I used the download package from phpBB.com
What is the most recent action performed on your board? Update from a previous version of phpBB3
Is registration required to reproduce this issue? Yes
Do you have any MODs installed? Yes
Do you have any extensions installed? Yes
What version of phpBB3 did you update from? phpBB 3.0.13
What MODs do you have installed? (1) One of our own to allow the Site Description to contain HTML.

(2) Another of our own which puts the text of a PM into the notification email sent for the PM, which is isolated in pm.php
What extensions do you have installed? (1) One of our own which adds two links into the page header navigation bar.
What styles do you currently have installed? prosilver, Absolution, aero, Carbon, DP-subsilver (our own mod of AllanStyle-subsilver), ne-blackgreen, prosilver Special Edition, SE Square SE Square Left, Visio
What language(s) is your board currently using? American English, Brazilian Portuguese, British English, Dutch casual, French, German Casual, Italian, Mexican Spanish Casual, Portuguese, Spanish Casual, Spanish Formal
Which database type/version are you using? MySQL 5
What is your level of experience? Comfortable with PHP and phpBB
What username can be used to view this issue? Probably none, as the problem applies to only a few users. And the users for whom we know it is happening have administrative privileges. If you really do need to login, using an unprivileged account of course, let me know via PM or email and I'll register one for you.
What password can be used to view this issue? None.
What actions did you take (updating your board; installing a MOD, style or extension; etc.) prior to this problem becoming noticeable? Those users who have the problem started complaining shortly after the upgrade to phpBB 3.2. Most users do not seem to have the problem.
Please describe your problem. Some users who are subscribed to some topics receive too many notifications via email of new posts to the topic. Suppose there are 5 new posts to the topic before they see the notification that someone has posted. Although they should only get one notification until they have visited the topic, they may get notified for each of those new posts.
Generated by SRT Generator
--
Walt

User avatar
Mick
Support Team Member
Support Team Member
Posts: 21156
Joined: Fri Aug 29, 2008 9:49 am
Location: Watching cricket - definitely

Re: Multiple email notifications for topic subscriptions

Post by Mick » Thu Jul 06, 2017 10:01 am

wfarrell wrote:
Thu Jul 06, 2017 12:51 am
What MODs do you have installed?(2) Another of our own which puts the text of a PM into the notification email sent for the PM, which is isolated in pm.php
An obvious question would be have you tried removing this MOD to see if it has anything to do with your issue? Bare in mind we only support approved MOD's and extensions and being as there are no MOD's, official or otherwise for 3.2, you will find very little help for that in case of issues. There is a forum for phpBB Custom Coding if you need assistance with any of your MOD's.
"The more connected we get the more alone we become" - Kyle Broflovski

wfarrell
Registered User
Posts: 27
Joined: Sat Jun 25, 2016 12:23 pm

Re: Multiple email notifications for topic subscriptions

Post by wfarrell » Thu Jul 06, 2017 1:09 pm

Good question, Mick. Thanks.

As the modified code is isolated in notifications/pm.php, which is used for notifications of new PMs, and the error is with notification of new topic posts (which is handled by notifications/post.php) I do not believe that it can be possibly related, and so I have not removed it.
--
Walt

wfarrell
Registered User
Posts: 27
Joined: Sat Jun 25, 2016 12:23 pm

Re: Multiple email notifications for topic subscriptions

Post by wfarrell » Thu Jul 06, 2017 6:43 pm

I have now figured out what is happening. And prompted by Mick's question I have removed the mod and disabled the extensions on our test system, and the recreated the problem there.

The problem occurs when a user goes to the UCP, Board Preferences, Edit notification options, "Someone replies to a topic to which you are subscribed" and chooses to be notifiedonly by email, and not by notifications. (That is, notifications box is not checked; email box is checked.)

At that point, the user will receive one notification email per post to the subscribed topic, even if he has not visited the topic after the first email notifying him of a post to that topic.

I do not have all the code details worked out yet, but in phpbb/notification/type/post.php starting around line 105 (find_users_for_notification()) there is code to determine who should be notified. That code:
  1. Selects the relevant users from the topic_watch table and the forum_watch table.
  2. Then at line 151 it tries to remove from that list the users who have already been notified but who have not responded, so it can update their notifications but not send them another email. It does that by calling get_notified_users(). For each user returned, it removes the user from the list of "to be notified" for this event.
  3. get_notified_users() retrieves its information from table notifications.
That would all work, except that for the users who want only email, and not notifications, when a post is made to the topic the notifications table is not updated. (I have verified this by examining the notifications table using mysql.) The notifications table appears to track only events where notifications are used, and does not track that emails were sent. Therefore, phpBB loses all track that it has previously notified this user, via email, of the new post to the topic, and sends another one. Etc.

It seems to me that either there should be an "email" table the equivalent of the notifications table, or the notifications table should track either form of notification. Otherwise, I do not see how phpBB can continue the function of only sending one email notification for a topic reply until the user visits the topic again.

I suspect, but have not tested, that this might also apply to other situations where a user chooses not to use notifications, but to only use email.
--
Walt

User avatar
canonknipser
Registered User
Posts: 1995
Joined: Thu Sep 08, 2011 4:16 am
Location: Germany
Name: Frank Jakobs
Contact:

Re: Multiple email notifications for topic subscriptions

Post by canonknipser » Thu Jul 06, 2017 7:40 pm

Maybe you discovered a bug in 3.2 - in a 3.1-Version, you can't disable "Notification" when "Email" is enabled.

Report it to the bug tracker: http://tracker.phpbb.com/
Greetings, Frank
phpbb.de support team member
English is not my native language - no support via PM or mail
New arrival - Extensions and scripts for phpBB

wfarrell
Registered User
Posts: 27
Joined: Sat Jun 25, 2016 12:23 pm

Re: Multiple email notifications for topic subscriptions

Post by wfarrell » Thu Jul 06, 2017 9:01 pm

That's interesting, Frank.

We skipped 3.1 so 3.2 is the first time we're seeing this notification architecture. If no one has a different suggestion soon I'll go over to the tracker.

Thanks!
--
Walt

wfarrell
Registered User
Posts: 27
Joined: Sat Jun 25, 2016 12:23 pm

Re: Multiple email notifications for topic subscriptions

Post by wfarrell » Thu Jul 06, 2017 10:02 pm

It was definitely worthwhile going to the tracker (which I had not found before). Thanks, Frank.

This is a known issue: PHPBB3-14754
--
Walt

jtb33
Registered User
Posts: 51
Joined: Thu Dec 02, 2004 11:36 pm

Re: Multiple email notifications for topic subscriptions

Post by jtb33 » Tue May 15, 2018 1:56 pm

+1 on getting this fixed. No update in approaching a year, huh?

Post Reply

Return to “[3.2.x] Support Forum”

cron