News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Login Error

Started by Saftek, May 29, 2017, 03:56:17 PM

Previous topic - Next topic

Saftek

SMF 2.0.14

After updating to 2.0.14

Getting: Your session timed out while posting. Please go back and try again. error with the login block at the top of any theme.

If I use the "login" link in the login or register line, or the login at the nav bar it works?

Any ideas why this might be happening?

vbgamer45

If your custom theme has a login form such as in the index.template.php or boardindex.template.php or in the login.template.php

The SMF 2.0.14 now requires the following code added in the <form> tag  just add in the closing </form> tag in any login form.


<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />


This code is used to help increase security for SMF.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Saftek

This happens with every theme... will check code in them.

vbgamer45

Yes it will occur on any custom themes.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Saftek

Apparently, that fixed the problem. Thanks.

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

vbgamer45

No idea might have failed update for some unknown reason.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Gwenwyfar

#7
Quote from: vbgamer45 on May 31, 2017, 08:12:49 PM
No idea might have failed update for some unknown reason.
Yeah, forget I said that. It's now saying it's at 2.0.13... Well let's see what happens when I run the package manager comparison checks again.

Edit: Yeah, it seems it was either a major failure somewhere, and it never installed, or 2.0.13 also had login modifications and I confused the two. Hoping the session fix included is what I was looking for then :)
"It is impossible to communicate with one that does not wish to communicate"

PPI Karl

This thread has been very helpful.  I've been struggling with this issue since the 2.0.14 update. The previous owner of forum, who was a professional programmer, had done some modifications to the templates that had me thinking either those could be the problem, or the outdated PHP version was responsible. I'm glad to have struck upon your answer.

I'm poised to edit the index.template.php file right now, but I'm a little confused by the semantics of your recommendation:
Quotecode added in the <form> tag  just add in the closing </form> tag in any login form
Do you mean just above where </form> occurs? Also, I already have something there that's similar: <input type="hidden" name="hash_passwrd" value="" />. Should I remove this, or just insert your recommended code in another line just below it?

Thanks for your help.  I apologize if the answers to my questions are really obvious. I'm not very experienced with code.  Your advice is hugely appreciated.

Sir Osis of Liver



                                        <input type="hidden" name="hash_passwrd" value="" />
<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
</form>';



Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

PPI Karl

Thank you for the clarification.  Much appreciated.  Have a great week.

PPI Karl

Well, unfortunately, I'm back for whatever help can be offered.

I've done everything suggested so far, including updating the PHP and editing the index.template.php as instructed. Yesterday, theme designer Diego Andrés also updated his Gaming Nation theme for the 2.0.14 patch (basically, the index.template.php of this theme now has the exact same addition of code already recommended by SMF). So, to the best of my knowledge, I'm now using the most current versions of everything.

Regardless, that log-in error widely reported since the 2.0.14 patch--"Your session timed out while posting. Please go back and try again"--persists.  It's not an every-time occurrence, but it happens to me at least once a day, and it takes repeated trips back to the log-in page and a few page-refreshes before it'll work.

I've read that customized templates might pose problems, but, as a total novice, I've performed only the most superficial, minor customization so far to the index.css (a change of font size and color, or the addition of a background image to the site--that sort of thing). 

I don't know what else there is to try, but I'm willing to try it. If anyone has hit upon a solution, or can recommend a better approach to this problem, I'd be grateful to hear it. Thank you very much!

Shambles

This appears to be a "solved" topic. Might be wise to open your own topic, otherwise it could get overlooked...

PPI Karl

Will do.  Thanks very much.  :)

TKG26

Thank you vbgamer45 for your assistance on this thread.

I had the exact same issue as the OP.. i just recently went from 2.0.12 to 2.0.14 and got reports from users trying to log in. Your code addition fixed my issue as well


Thanks
www.rcottawa.com

usa4all

Exactly my problem!  Tx!

Advertisement: