[SOLVED] How to find root cause of "The submitted form was invalid. Try submitting again."

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
nicole-builds-it
Registered User
Posts: 5
Joined: Fri Sep 13, 2019 11:50 am

[SOLVED] How to find root cause of "The submitted form was invalid. Try submitting again."

Post by nicole-builds-it » Sat Sep 14, 2019 1:15 am

Hello! I've recently updated my forum software from 3.2.2 to 3.2.7 and now I am unable to create posts on my forum. After pressing either preview or submit, it always returns "The submitted form was invalid. Try submitting again.".

My research suggests this is an issue with the form_key not being validated correctly. I've looked into updating my installed style to make sure it's included the {S_FORM_TOKEN}, but it seems like it has already been included everywhere and therefore no changes need to be made. I use mostly ProSilver, but have created a sub-style which inherits from ProSilver. Only a dozen or so files have been changed, and I don't believe any are related to posting in the forum.

Is there a way to confirm that form_token is the problem? And if not, are there any other root causes that could cause this error to be thrown when trying to create a post? Any method of debugging?
Last edited by nicole-builds-it on Sat Sep 14, 2019 5:55 pm, edited 1 time in total.

User avatar
3Di
Former Team Member
Posts: 14071
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: How to find root cause of "The submitted form was invalid. Try submitting again."

Post by 3Di » Sat Sep 14, 2019 1:25 am

That should be fixed in 3.2.8.

@see: https://github.com/phpbb/phpbb/pull/5637/files
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
👨‍🏫 | Take a tour to | The Studio | 👨‍🏫

nicole-builds-it
Registered User
Posts: 5
Joined: Fri Sep 13, 2019 11:50 am

Re: How to find root cause of "The submitted form was invalid. Try submitting again."

Post by nicole-builds-it » Sat Sep 14, 2019 1:35 am

Hmm... I am able to log into the forum perfectly fine. It only happens when creating new posts. I think the issue is with check_form_key('posting'), not 'login'?

nicole-builds-it
Registered User
Posts: 5
Joined: Fri Sep 13, 2019 11:50 am

Re: How to find root cause of "The submitted form was invalid. Try submitting again."

Post by nicole-builds-it » Sat Sep 14, 2019 5:54 pm

For anyone reading, the issue is solved. It was in fact related to the 'login' code, as I had put a small change in functions.php, as explained here:
viewtopic.php?f=641&t=2522596

I was using {S_KEY_TOKEN}, not {S_LOGIN_REDIRECT} (which includes S_KEY_TOKEN_LOGIN within it). I guess having two {S_KEY_TOKEN}s on the same page in different forms messed things up. Hoping the change gets added in 3.2.8 so that the custom code in the core phpBB code can be removed! :)

Post Reply

Return to “[3.2.x] Support Forum”