Previous Thread
Next Thread
Print Thread
Hop To
#265421 08/06/2022 1:12 PM
Joined: Oct 2007
Posts: 325
Likes: 7
Enthusiast
OP Offline
Enthusiast
Joined: Oct 2007
Posts: 325
Likes: 7
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

x86_64 GNU/Linux
UBBThreads 7.7.5
Web Server Apache/2.4.6
PHP Version 7.4.30
MySQL Version 5.7.38
Database Size 1.72 GB
Joined: Dec 2003
Posts: 6,470
Likes: 70
Offline
Joined: Dec 2003
Posts: 6,470
Likes: 70
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 3:57 PM. Reason: Added Comment

Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Oct 2007
Posts: 325
Likes: 7
Enthusiast
OP Offline
Enthusiast
Joined: Oct 2007
Posts: 325
Likes: 7
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.

Attached Images
Screen Shot 2022-08-07 at 6.00.38 PM.png

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

x86_64 GNU/Linux
UBBThreads 7.7.5
Web Server Apache/2.4.6
PHP Version 7.4.30
MySQL Version 5.7.38
Database Size 1.72 GB
Joined: Apr 2004
Posts: 1,917
Likes: 140
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Apr 2004
Posts: 1,917
Likes: 140
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: UBBT 7.7.5 // Work In Progress: soon
isaac @ id242.com // my forum @ CelicaHobby.com
Joined: Oct 2007
Posts: 325
Likes: 7
Enthusiast
OP Offline
Enthusiast
Joined: Oct 2007
Posts: 325
Likes: 7
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

x86_64 GNU/Linux
UBBThreads 7.7.5
Web Server Apache/2.4.6
PHP Version 7.4.30
MySQL Version 5.7.38
Database Size 1.72 GB

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
"forum introduction body" - Where is this stored.
by mmem700 - 09/24/2022 10:58 AM
Google Search Console mobile usability issue
by cegadm - 09/11/2022 4:36 PM
10 images attached - only one displayed
by Baldeagle - 09/06/2022 6:01 PM
Help! Broken UBB
by JPFolks - 06/27/2022 3:43 PM
Who's Online Now
0 members (), 86 guests, and 56 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 7.7.5