Previous Thread
Next Thread
Print Thread
Hop To
#265421 08/06/2022 12:12 PM
Joined: Oct 2007
Posts: 464
Likes: 11
Addict
Addict
Joined: Oct 2007
Posts: 464
Likes: 11
We're encountering a problem in the latest version fo UBB that I wonder if anyone else is seeing. You can find the discussion about it in our Tech forum (we call it the IT Short Bus).https://www.stovebolt.com/ubbthreads/ubbthreads.php/topics/1461231/broken-post-doesnt-show-up-lost-in-space.html#Post1461231

Basically, if you inadvertently click on Post before typing anything in the body of the post (or sometimes even if you HAVE typed something in but you're not done), when you try to post the comment after completing it, you'll get an error message that says your post has already been posted.

Has anyone else encountered this? Is it unique to our board?


The Stovebolt Geek
https://www.stovebolt.com/ubbthreads/ubbthreads.php

Server Information
UBB.threads Version 8.0.0
Release 20240826
Server OS Linux
Server Load 0.11
Web Server Apache/2.4.37
PHP Version 8.3.11
MYSQL Version 8.0.39
Database Size 1.82 GB
Joined: Dec 2003
Posts: 6,629
Likes: 85
Joined: Dec 2003
Posts: 6,629
Likes: 85
I have seen that behavior before.
But it was a couple years back and I don't recall if it was resolved by a fix or correction on the server or the issue just went away on its own..
This is what is here
https://www.ubbcentral.com/forums/ubbthreads.php/ubb/showflat/Number/244404

The actual error I believe is:
Quote
Your post has already been submitted. The submit button is now disabled.

Last edited by Ruben; 08/07/2022 2:57 PM. Reason: Added Comment

Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Oct 2007
Posts: 464
Likes: 11
Addict
Addict
Joined: Oct 2007
Posts: 464
Likes: 11
I did some testing. I created a post with a subject but without a body, and vice versa. That generated an error "All of the required fields are not filled in." I clicked on "Return to the previous page" and added the missing content. Then I clicked on Post New Thread, and I got the attached error popup.

The same error occurs if I use the back button instead of clicking on "Return to the previous page"

This seems (to me) to be unexpected behavior. You should be able to post after returning to the previous page and completing the post.

If, after returning to the previous page, I reload the page (which wipes out any remaining content) and then enter a subject and body, I'm able to post properly.
Attachments
Screen Shot 2022-08-07 at 6.00.38 PM.png


The Stovebolt Geek
https://www.stovebolt.com/ubbthreads/ubbthreads.php

Server Information
UBB.threads Version 8.0.0
Release 20240826
Server OS Linux
Server Load 0.11
Web Server Apache/2.4.37
PHP Version 8.3.11
MYSQL Version 8.0.39
Database Size 1.82 GB
Joined: Apr 2004
Posts: 1,973
Likes: 154
UBB.threads Developer
UBB.threads Developer
Joined: Apr 2004
Posts: 1,973
Likes: 154
the javascript is extremely simple.

The alert message var is declared in the header as "submitClicked"

submitPost() is the JavaScript that triggers display of alert message.


clearSubmit() is set to 0 when newpost, newreply, showflat pages are first loaded, and it sets submit_clicked() to 0.
clearSubmit() JS is simply -
Code
function clearSubmit() {
	submit_clicked = 0;
}


submitPost() is triggered only when the "Post Reply" or "Post New Thread" button is clicked.
submitPost() JS is simply -
Code
function submitPost() {
    if (submit_clicked == "1") {
        return alert(submitClicked);
    }
    submit_clicked = 1;
    document.replier.submit();
}

Upon first click, the first section of the script is skipped when its initially run because submit_clicked set to 0 by clearSubmit(). The second part is run and the post is submitted for entry in to the database. submit_clicked is also set to 1, which will be processed with the alert when a second click happens.

thats all it is.


What browser are you using, and is it up to date?

JavaScript is a user-side scripting language. Are you running your site through a pre-caching DNS which is not correctly letting the user's browser handle their own JavaScript operations?

Is your server/database slow between loading pages?


current developer of UBB.threads php forum software
current release: UBB.threads 8.0.0 // wip: UBB.threads 8.0.1
isaac @ id242.com // my forum @ CelicaHobby.com
Joined: Oct 2007
Posts: 464
Likes: 11
Addict
Addict
Joined: Oct 2007
Posts: 464
Likes: 11
Thanks, Isaac. I'm testing in Safari 15.6 on Mac OS 12.5 (Monterey), but we're getting reports from users, most of whom use Windows (and probably Edge or Chrome.)

When I test in Chrome, it seems to work as expected. So, the problem appears to be browser-related wrt how it processes Javascript.

No, we're not running through a pre-caching DNS

Our server is fairly quick. Top shows plenty of reserve capacity.

Code
top - 20:46:23 up 35 days, 18:16,  1 user,  load average: 0.05, 0.09, 0.07
Tasks: 235 total,   1 running, 234 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.8 us,  0.2 sy,  0.0 ni, 99.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem : 16223096 total,   453496 free,  1424980 used, 14344620 buff/cache
KiB Swap:  4095996 total,  3989244 free,   106752 used. 13658204 avail Mem 


The Stovebolt Geek
https://www.stovebolt.com/ubbthreads/ubbthreads.php

Server Information
UBB.threads Version 8.0.0
Release 20240826
Server OS Linux
Server Load 0.11
Web Server Apache/2.4.37
PHP Version 8.3.11
MYSQL Version 8.0.39
Database Size 1.82 GB

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Profile avatar storage settings
by SenecaFlyer - 12/05/2024 1:24 PM
Not allowing attachment over 2m
by ehill - 12/03/2024 3:16 PM
New Admin Here
by SenecaFlyer - 12/02/2024 4:14 PM
Who's Online Now
2 members (Ruben, SenecaFlyer), 929 guests, and 67 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)