"time out" error when logging in

Started by brynn, August 07, 2017, 12:24:19 PM

Previous topic - Next topic

brynn

Hi Friends,
I've recently moved my forum (SMF 2.0.14, with Tiny Portal 1.2 and approx 45 other mods)  to a new server (new host).   https://forum.inkscapecommunity.com/index.php

And more recently than that, have converted everything to https, using this topic as a guide (and also with some advice from lurkalot).

Here's the problem:

If we use the convenient little box in the top-right corner to log in, we get this error:

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

Note that the message comes up immediately, so not enough time has passed for it to actually time out.  And plus, going back to try again gets the same result!  (And plus, we weren't posting, we were logging in.)

So while I would consider that specific error message to be a bug (on 3 different counts!), the more immediate problem is why can't we  log in with that little box anymore?

I've only just now found this problem, and don't know exactly when it happened.  But I did use that log in box just before the move.  Actually I used to get this error now and then, before the move.  But going back and trying again, it would log me in as expected.

It IS still possible to log in by clicking on the Login tab.  But I'd like to fix the little box, if possible.

My first thought is to look up the theme.  And I think I've even found the right place in the index template.   I thought possibly I might need to add an s somewhere.  But I don't see anything like that.

I did check that page using https://www.whynopadlock.com/index.html, and there is no insecure content on that page.  So it's not a case of needing an s somewhere...at least I don't think.

Does anyone know what might be causing this problem, and how to fix it?

Thank you very much  :)

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

brynn

Hhmm...would that be <form id=...> or <form action=...>.  I found those, but so far, I haven't found any tag that's just <form> or <form=...>  (I know some simple html, but I've never made a form.)

I think there might be a typo.  Do you mean I need to add the string of code you provided and the closing form tag (</form>)?  Or do you mean to add it in between <form....> and </form>?

Hhm, ok there already is a closing </form> tag....at least in the one theme I've looked at.  So you must mean to put it in between.

And when you say "...in any login form."  do you literally mean any?  Or do you mean I need to do it for all my themes?

Thanks  :)

vbgamer45

Just in any theme you use in the index.template.php
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

Sir Osis of Liver

index.template.php

Look for this -



<input type="hidden" name="hash_passwrd" value="" />



Do this -



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



And, yes, you'll have to fix any theme other than Curve.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

lurkalot

Brynn, you'll also need to turn of the User Block, or upgrade to TP 1.3, because the user block has a login form which will also throw that error if you have it turned on.   This is fixed in TP 1.3

brynn

lurkalot, I'm not sure if I know what the User Block is.  I've never logged into anything separate for TP.  The block that I would guess might be the user block does not show the error.  Maybe I already don't have it enabled?

Oh wait, I know what the User block is.  Yes, I have it enabled.  But it doesn't show the problem.

Thanks for the clarification, Sir Osis of Liver!  That will be very helpful.  Getting late here, so probably won't fix until tomorrow.

Steve

I would go ahead and upgrade your tiny portal whether you're having a problem or not.
DO NOT pm me for support!

brynn

Ok, thanks Steve.  I'll put it on my to-do list :)

Login problem is fixed.  Thanks again everyone!

lurkalot

Quote from: brynn on August 09, 2017, 08:41:25 PM
Ok, thanks Steve.  I'll put it on my to-do list :)

Login problem is fixed.  Thanks again everyone!

It is until you login from the user block on the forum page.  ;)

brynn

Oh gosh, now I need to unsolve this.

At first, it looked like this fixed the problem.  But it has introduced some other problem and I don't know how to fix it.

You can see it best on my other site:  https://www.inkscapecuttingdesign.com/smf/index.php  (SMF 2.0.13 with Simple Portal)

The main menu isn't displayed graphically anymore - only as text.

Here's what I did.  For every theme, in index.template.php, I searched the string which Sir Osis instructed, and replaced with the string which he indicated.

When I saw the problem, I immediately undid everything.  I replaced the original version of index.template.php.  And I've double-checked every single file (I have several themes there) has the original version afaict.  But the problem still is persisting.

For the default theme on my other site (Aqua Style), the fix worked and didn't cause any problems (https://forum.inkscapecommunity.com/index.php) (SMF 2.0.14 with Tiny Portal).  But some of its other themes are affected as well.  Here, I have not reverted the files yet.

So far, I'm focused on the default SMF theme (which is also called Curve, right?) for where the problem might be.  I had missed Sir Osis's comment about not doing this to the default theme.  So I applied this fix to the default SMF theme. 

But, even so, I've replaced the original index.template.php file, for all the themes.  But it didn't fix the problem.

Does anyone have any idea what happened, or how I can fix this?

Thank you very much

Sir Osis of Liver

The login edit would not cause that problem, even if done incorrectly.  It's also doing it in Curve.  Looks like you switched from TinyPortal to SimplePortal.  Uninstall the portal and see if the problem clears.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

brynn

No, one site uses Tiny Portal and the other one uses Simple Portal.  I haven't changed that or even edited the portals.  Plus the problem is affecting both sites.

However, if it's not the edits that's causing this, maybe I should ask my host if they changed something.

Sir Osis of Liver

Look in Admin -> Support and credits, post the version info.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

brynn

Ok, so my host says they didn't do anything that could be causing this.  So I still don't know what happened.

Can someone tell me which files I need to look at, which are responsible for the graphic display of the main menu (that makes it look like tabs, rather text and text links)?

Not sure why you want this.  I realize now that I didn't need to apply the login fix to the 2.0.13 version.  But I've restored all the files, in any case.  But fwiw:

inkscapecommunity.com

Version Information:
Forum version: SMF 2.0.14 (more detailed)
Current SMF version: SMF 2.0.14
GD version: bundled (2.1.0 compatible)
MySQL version: 10.1.26-MariaDB
PHP: 5.6.31
Server version: Apache

inkscapecuttingdesign.com

Version Information:
Forum version: SMF 2.0.13 (more detailed)
Current SMF version: SMF 2.0.14
GD version: bundled (2.1.0 compatible)
MySQL version: 10.1.26-MariaDB
PHP: 5.6.31
Server version: Apache

Illori

can you provide a test login so we can test the issue?

the issue with the menu is on http://www.inkscapecuttingdesign.com/smf/ right?

it looks like the css it is looking for is completely missing from your index.css file.

brynn

The issue is with the menu on both sites.  But it appears on that site, all the themes are affected.  On inkscapecommunity.com, the forum default theme is fine, but other themes are affected.

lurkalot has an account.  But I'll PM you another one you can use.  It's just a regular member account.

Hhm, yes.  On the 4 or 5 themes I've looked at so far, the index.css file is completely missing from those themes which are showing the problem!!  How in the world could that have happened, I wonder??

Illori

#17
so you mean the theme does not load correctly at all? if so maybe they are not SMF 2.0 themes and have a style.css file instead? if so they will not work with SMF 2.0.

since that is a theme related issue, you should post in the themes support topic for assistance.

neither site gave an issue logging in using the login box at the top of the page.

actually i looked into it further, it looks like in this theme the css for the menu is present but not loading on your site. did you modify the theme css at all?

lurkalot

Gets worse.  ;)  If you select a different theme, even the SMF default Curve theme and look at the copyright at the bottom, it'll say "Aqua Style by Diego Andrés " on every theme.

The only one that's working properly is "Aqua Style by Diego Andrés"

brynn

They are all definitely SMF 2.0 or higher themes which I downloaded from this site.  Everything was working fine until the afternoon/evening of Aug 8th.

When you say the css for the menu is present but not loading, which site are you talking about (so I know which theme to look at)? 

Oh wait!  Ok, so in the theme which is still working correctly, there's an index.css file in the main theme directory.  AND there's an index.css file in the css sub-dir.  In all the themes which don't work, the index.css file is only in the css sub-dir.  So they aren't missing after all.

No, I didn't modify any index.css file.  I looked at the index.css file for the theme which is still working correctly.  I looked at it in admin panel > Current Theme > Modify the stylesheet > index.css.  So potentially that page can make changes.  So an accidental mouse click could potentially have changed something.  However, I was looking at that file for the theme which is still working correctly.

I could have accidentally drag/dropped a file into a different folder (via SFPT).  Once, maybe twice.  But certainly not to all these themes.  I just don't understand how this could have happened.....  Not unless it's somehow related to using repair-settings.php a week or 2 ago, when I switched my whole site to https under my SSL certificate.

(In all, I edited index.template.php (for all themes), Contact2.template.php (mod for a contact form) and Register.template.php (put extra comment on reg page).

Well, before I go on with this, do you think I should close this topic, and start a new one....where?  It looks like I would have to post a lot of new topics.  It looks like you can only post into existing topics that are dedicated to each theme, on this board https://www.simplemachines.org/community/index.php?board=59.0.  Plus, when I've posted in theme topics in the past, there was never any answer.  Unless you really feel strongly that I could get better support on a different board....well, this is still a support question.

Thanks again :)

(Hi lurkalot.  Yes, I see that.  Hopefully it's somehow part of this problem.  But if not, let's deal with one thing at a time.)
(I just don't get how this could have happened.  Should I worry that I was hacked?)

Advertisement: