1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 Multiple "new posts" alert between visits

Discussion in 'Troubleshooting and Problems' started by Mouth, Jan 14, 2015.

  1. Mouth

    Mouth Well-Known Member

    I'm getting a couple of users saying they are getting multiple "new posts" alerts, between their visits. For example ...


    How can I diagnose this further?
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  3. Mouth

    Mouth Well-Known Member

    Appreciate the assistance.

    It is installed, but has been disabled for over a month.
    Also, the thread you linked to is over 2 years old and, following it's link to Tapatalk, the issue it references was fixed by them over 2 years ago too.

  4. Xon

    Xon Well-Known Member

    Alerts will always be sent if ~15 ignored posts occur before the reply, as XF gives up trying to find a post the user hasn't seen.
  5. Brogan

    Brogan XenForo Moderator Staff Member

    A single alert will be sent until the thread has been viewed.
  6. Mouth

    Mouth Well-Known Member

    Yes, that was my understanding. Put as per my screenshot above, you can see the user is getting multiple notifications for the "Dumb Ass Questions" thread. The user was not logged on during that day yet, and got all those alerts at once when they logged in several hours later.
  7. Xon

    Xon Well-Known Member

    That may be the intention, but the implementation will send alerts if there are enough ignored posts before the just posted reply.

    XenForo_Model_ThreadWatch::sendNotificationToWatchUsersOnReply fetches the last 15 posts, and then checks to see if the previous posts are ignored in an attempt to determine the a post_date to compare to the user's thread read date.

                if (!$defaultPreviousPost || !$userModel->isUserIgnored($user, $defaultPreviousPost['user_id']))
                    $previousPost = $defaultPreviousPost;
                    // need to recalculate the last post that they would've seen
                    $previousPost = false;
                    foreach ($latestPosts AS $latestPost)
                        if (!$userModel->isUserIgnored($user, $latestPost['user_id']))
                            // this is the most recent post they didn't ignore
                            $previousPost = $latestPost;
                if (!$previousPost || $previousPost['post_date'] < $autoReadDate)
                    // always alert
                else if ($previousPost['post_date'] > $user['thread_read_date'])
                    // user hasn't read the thread since the last alert, don't send another one
    Last edited: Jan 15, 2015
  8. Mike

    Mike XenForo Developer Staff Member

    It's probably unlikely to be that, because a single post by a non-ignored person will prevent it (and you wouldn't get an alert by someone you ignore).

    It's more than likely related to an add-on though. Every time something like this has come up, it's been eventually tracked back to an add-on.
    Isil`Zha and Xon like this.
  9. Xon

    Xon Well-Known Member

    I had someone with +800 ignored users on their ignore list, another person with +600, and another 3 with +200 ignored users.

    And the person with +800 ignored users; added about 200 from September to November and another 100 for December.


    Very likely.
    Last edited: Jan 15, 2015
    Isil`Zha likes this.

Share This Page