Erroneous "More topics may be posted, but you won't receive more..." message

Started by nc3man, March 03, 2023, 07:01:49 PM

Previous topic - Next topic


As noted in one reply in the SMF 2.1.x support board, when a user sets notification frequency to Immediate, they receive emails for ALL new topics on a watched board, no matter whether they visit the board or not, unlike the Immediate (but only for the first unread message) behavior. Nevertheless, an Immediate new board topic notification still contains the extra sentence:
More topics may be posted, but you won't receive more email notifications for this board until you return to the board and read some of them.
We are running SMF 2.1.2 and have tested that multiple new topics are sent straight away to a user watching the board whether or not they actually go to the board to read "some of them" (whatever that vague statement really means). That message is false, confusing, and may cause users to feel compelled to take a detour (browser and their time) for a topic not important to them in order to keep notifications alive. I was able to fix this by changing line 540 in CreatePost-Notify.php from
$message_type = !empty($frequency) ? 'notify_boards_once' : 'notify_boards';
to simply
$message_type = 'notify_boards';
It appears that the test !empty($frequency) is not doing the right job. Perhaps checking the value of $frequency instead of testing empty would select the correct message. With my quick hack, no one will receive the confusing message about returning to the forum to look at stuff to keep new topic notifications enabled. This is still not the right behavior but in our use case 95% or more of our users use the Immediate frequency setting. I don't know what the behavior is in smf 2.1.3 but we're not upgrading until 2.1.4 is released because of another notification bug.


Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp


I checked the value of $frequency for the Immediately setting. It is non-empty, equal to 1. For Immediately (but only for the first unread message) $frequency=2. So the following change to line 540 in CreatePost-Notify.php works. I tested it under both conditions.
$message_type = (!empty($frequency) && $frequency==2) ? 'notify_boards_once' : 'notify_boards';


I also posted the offered solution on
I had this mark solved, but unmarked it until this is fixed, hopefully in 2.1.4 with the other notification issue when both a board and topic are simultaneously watched. Since I'm unfamiliar with smf design and architecture and all possible states for $frequency, there may be a better fix.