I also encountered such a problem. I can not figure it out yet
The forum dedicated to site issues, problems and wishes.
It's not a PHP bug, the duplicate posts is a consequence of how HTTP protocol (used for webpages communication) works in a stateless way.Axel Slingerland wrote: ↑17 Sep 2018 04:41Over the last 20 or so years, I've worked on many forums as both a Moderator and an Administrator, using several different forum software packages, some of which are free like PHPBB and some are very expensive, high quality programs like vBulletin and Invision Power Board. The duplicate posts thing happens on all of them, and it has nothing to do with how you post. (Computer, phone, etc.) For this reason, I think it's a PHP bug.
When we press a "submit" button on any webpage anywhere, that webpage code calls a function to gather all the data we wrote on the form and send it to another piece of webpage code on the server that is responsible of publishing the message (for a forum). That action takes an instant, in which our navigators are still showing the webpage with the submit button. If we press it again, because we click too much times the mouse, or the touchscreen of our mobile detects several pressings by mistake, or if we do it on purpose because we think the webpage is stuck (what happens when the page is working slowly); then what we are doing is calling several times the pice of code that sends the written data on form to the server.
Then, the server receives several packets of data and it process them all, publishing several times the same message. For it, there's no relation between any data packets that it receives thus it process them all in a separated way, that's the meaning of HTTP being a stateless protocol. So the server will never check if the second, third, fourth... communication it receives are duplicated by mistake. It will treat them all independently.
There are ways to reduce or even completely avoid those problems, but they suppose a lot of extra work for the people codding the webpage (specially the ones to completely avoid it). Also a part of the code that it's prone to errors that could lead the form on that webpage to be unusable for a lot of users. So, the coders have to got the time to do it right and the knowledge to really know what are they doing (and believe me, that's very advanced web programming not everybody out there knows). Also, several solutions to this problem need technologies that appeared years after the forums systems templates (like PHPBB, vBulletin...) appeared. That means that if its internal code doesn't evolve a lot, they will lack those options. Usually those forum systems are Open Source and maintained by people that just have not enough time to big overhauls needed to completely fix thinks like double posting. They use their time fixing bugs, adjust things to keep their compliance with new standards and navigators and adding new features more widely demanded. Double-posting it's usually considered, on the big picture, as a little nuisance at the bottom of "to do" list of things.
Who is online
Users browsing this forum: Graf_Boinenn and 2 guests