News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

"Someone has posted before you" Alert notifications (RC3)

Started by Douglas, July 14, 2021, 11:02:46 AM

Previous topic - Next topic

Douglas

Quote from: PonderinHog via HogvilleDoug, I'm getting that pesky "Someone has posted before you" warning.  Not a problem now, but when the game threads fire up, it's going to be an issue.

Was this issue addressed in RC4? This needs to be an end-user configurable option under notifications/alerts, with the default being turned OFF.

For smaller sites, this wouldn't be an issue... on Hogville, during game days, we can literally get 100+ replies a minute... Ponderin's right... that's going to royally tick people off, BIG time.

Thanks!
Doug Hazard
* Full Stack (Web) Developer for The Catholic Diocese of Richmond
(20+ Diocesan sites, 130+ Church sites & 24 School sites)
* Sports Photographer and Media Personality
* CFB Historian
* Tech Admin for one 1M+ post, one 2M+ post and one 10M+ post sites (last two are powered by multiple servers)
* WordPress Developer (Junkie / Guru / Maven / whatever)

Douglas

I've been patient enough, after nearly 3 days.

Allow me to


this up. Really need an answer to this, please.
Doug Hazard
* Full Stack (Web) Developer for The Catholic Diocese of Richmond
(20+ Diocesan sites, 130+ Church sites & 24 School sites)
* Sports Photographer and Media Personality
* CFB Historian
* Tech Admin for one 1M+ post, one 2M+ post and one 10M+ post sites (last two are powered by multiple servers)
* WordPress Developer (Junkie / Guru / Maven / whatever)

shawnb61

No issue was ever logged.

I just logged one for you:
https://github.com/SimpleMachines/SMF2.1/issues/6851

A workaround is described in this thread:
https://www.simplemachines.org/community/index.php?topic=577845.0

The actual wording is: "Warning - while you were typing a new reply has been posted..."
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Sesquipedalian

#3
In SMF 2.0 there is a "Don't warn on new replies made while posting" setting in Profile ► Look and Layout. That setting was removed early in the development of SMF 2.1. I have just submitted a pull request that restores that setting to MF 2.1. The PR still needs to be discussed and reviewed by other developers. If and when that PR is merged, members will be able to control this behaviour as they wish, and the admin will be able to set a default for it using Administration Center ► Themes and Layout ► Member Options.

In the meantime, Douglas, if you want a quick and dirty hack to get the behaviour you want, you can make the following two changes in Post.php:




Code (Find) Select

if (isset($_REQUEST['last_msg']) && $context['topic_last_message'] > $_REQUEST['last_msg'])


Code (Replace) Select

if (false && isset($_REQUEST['last_msg']) && $context['topic_last_message'] > $_REQUEST['last_msg'])





Code (Find) Select

if (isset($_POST['last_msg']) && $topic_info['id_last_msg'] > $_POST['last_msg'])


Code (Replace) Select

if (false && isset($_POST['last_msg']) && $topic_info['id_last_msg'] > $_POST['last_msg'])





Obviously, this hack will forcibly prevent the warning from ever being shown in any circumstance whatsoever, so it isn't a good long-term solution. But it should do the job for your use case in the meantime.


EDIT: For what it is worth, I don't think the workaround described in https://www.simplemachines.org/community/index.php?topic=577845.0 is a very good idea. I haven't tested it, but it sure looks like in some circumstances it could result in getting the user stuck in a loop where they still wouldn't be able to post, but would have no idea why.
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

Douglas

Shawn, thank you for logging the issue. :)

Sesqui-WHAT, appreciate the assist and the needed changes, and for the pull request.

Count me amongst those that this definitely needs to be restored back to how it was in SMF 2.0. Something like this is invaluable to so many... and saves a LOT of headaches on larger sites, especially when we have that defaulted to off and give our visitors the opportunity to turn it on.

Again, thank you, both, for jumping on this. It's truly appreciated!
Doug Hazard
* Full Stack (Web) Developer for The Catholic Diocese of Richmond
(20+ Diocesan sites, 130+ Church sites & 24 School sites)
* Sports Photographer and Media Personality
* CFB Historian
* Tech Admin for one 1M+ post, one 2M+ post and one 10M+ post sites (last two are powered by multiple servers)
* WordPress Developer (Junkie / Guru / Maven / whatever)

Advertisement: