News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Your session timed out while posting. Please go back and try again

Started by me314159, June 15, 2018, 12:19:32 PM

Previous topic - Next topic

me314159

I know a lot has been posted on this topic over the years.   But, I'm not really following all the posts to the point of being able to solve this problem on my own.   

I've recently installed SMF 2.0.15 (reasonably sure - but can't login to check) and find I am unable to login. I get this message:

  An Error Has Occurred!
  Your session timed out while posting. Please go back and try again.


Any help would be much appreciated.

Thanks.

EDIT:
Okay, I found a way to get in.  This workaround works for now (but I'd still like to find the real issue)
www.forumdomain.com/index.php?action=admin


Kindred

typical causes

1- you have your forum set up to use www but you are accessing the forum through the non-www link
(fix? use repair_settings.php to correct the URL and use an .htaccess file to force users to the correct url)

2- You are using a theme other than the default theme and have not made the required update to properly use those theme(s) with 2.0.14+
(fix? see the FAQ)

3- you are one of the folks who have a weird server setup and need to review the session check details
(fix? there was one suggestion to disable the session check - not a great choice, but we can not consistently repeat the issue on any of our configured servers to confirm/test what the actual issue is) I don't recall the thread, but sir osis of liver suggested the change.

4- you changed something and have a bad cookie pointing to an old configuration.
(fix? delete the cookie from your local computer/browser or use a different computer/browser)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

me314159

I am using a theme called Epic Orange which I got from here:
  https://custom.simplemachines.org/themes/index.php?lemma=2510)

I didn't see anything regarding the "required update" to properly use the theme. I was following these instructions:
  https://wiki.simplemachines.org/smf/Installation_-_How_do_I_install_a_theme

Quote from: Kindred on June 15, 2018, 12:27:30 PM2- You are using a theme other than the default theme and have not made the required update to properly use those theme(s) with 2.0.14+
(fix? see the FAQ)

Illori

look at the link i provided further up in this topic. it has the fix.

Sir Osis of Liver

There's was a glitch on a couple of forums that caused the session timeout in 2.0.14 Curve.  Adding the session check to login in custom themes didn't help.  Don't know what caused it, fixed it by removing session check in Load.php.  There was another fix or mod posted for session timeouts (by Arantor?), but I never had the opportunity to try it on affected forums.  Haven't seen this problem in 2.0.15.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

me314159

Okay, thanks!   I fixed it by adding

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

Inside one of the functions located in this PHP file (which belongs to the theme) 

forum_dir/Themes/epic-orange/index.template.php

I placed the line of html code just before </form> in a function called template_body_below() - which happens to be line 303.

I used the default index.template.php (that comes with installation of SMF) as a guide - and I can see I may need to place <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />  in more than spot of my theme index.template.php file (not sure right now)

Referring to the original, default, index.template.php file that comes with SMF:
I can see <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />    inside of three functions  - they are:
  template_login() on line 72
  template_kick_guest() on line 139
  template_maintenance() on line 188



Quote from: Illori on June 15, 2018, 01:22:33 PM
look at the link i provided further up in this topic. it has the fix.

Kindred

no no no....


it should have been placed exactly where the FAQ indicates...   and that is *NOT* in the template_body_below
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

me314159

I followed this (and it did work):
https://wiki.simplemachines.org/smf/Login_error_2.0.14

So, are you saying the link is completely wrong?

Quote from: Kindred on June 15, 2018, 03:53:04 PM
no no no....


it should have been placed exactly where the FAQ indicates...   and that is *NOT* in the template_body_below

Kindred

Quote... along with the other "hidden" input types ...


anywhere before the closing /form was mentioned, and probably works, but is bad coding.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."


Advertisement: