News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Login problem in IE8

Started by Krashsite, April 25, 2011, 11:04:09 PM

Previous topic - Next topic

Sir Osis of Liver


Discussed this in another thread, just isolated the cause.  First found it in a clean RC5 install on a Crip theme.  Same thing in default theme.  It also happens on this board.

Problem:  When I try to login with IE8, if session length is set to '60' on login page (or '1 hour' in header login), login fails ('Unable to login.... Check cookie settings').  Any other number/setting works.  Login is normal in FF3.5.

It's in Login.template.php -



echo '
<dl>

<!--dt>', $txt['mins_logged_in'], ':</dt>
<dd><input type="text" name="cookielength" size="4" maxlength="4" value="', $modSettings['cookieTime'], '"', $context['never_expire'] ? ' disabled="disabled"' : '', ' class="input_text" /></dd-->

<dd><input type="hidden" name="cookielength" size="4" maxlength="4" value="61"', $context['never_expire'] ? ' disabled="disabled"' : '', ' class="input_text" /></dd>

<dt>', $txt['always_logged_in'], ':</dt>
<dd><input type="checkbox" name="cookieneverexp"', $context['never_expire'] ? ' checked="checked"' : '', ' class="input_check" onclick="this.form.cookielength.disabled = this.checked;" /></dd>';



As you can see, I've eliminated the session length option, and made it a hidden input set to '61'.  It's not necessary, and this way user is either logged in for 61 min. by default, or checks 'Always stay logged in'.  If you play with the number, you'll see that anything works except '60'.


No, it's not the browser's fault, and yes, many people use IE.

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

                                     - R. Waters

Arantor

Think you'll find this one is the browser's fault. If it works on all other browsers, and only fails on IE8 for that one specific value... how is that not an IE problem?

Sir Osis of Liver

#2

Why would it fail in IE for one specific value?  That's not how browsers work.  In any event, it's easily fixed in SMF, and should be.  There's another thread running in 2.0 Support about a similar problem.

Like it or not, if your code doesn't work right in IE, it's not suitable for production websites.


Just checked - does the same thing in 1.1.11 and 1.1.13 default themes.

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

                                     - R. Waters

Arantor

It works for all values in other browsers. It works for other values in IE. That one value does not.

Your fix is not a fix, it changes functionality. That said, no doubt the team will agree with you, that it's better to remove functionality than to fix it.

IchBin™

Quote from: Arantor on April 26, 2011, 03:31:14 PM
It works for all values in other browsers. It works for other values in IE. That one value does not.

Your fix is not a fix, it changes functionality. That said, no doubt the team will agree with you, that it's better to remove functionality than to fix it.

Your right, you should see the SMF2 final version it is almost featureless. ::)
IchBin™        TinyPortal

Arantor

No, I'm referring to a specific bug in the DB library, where it was decided that it was better to remove the function rather than fix it, oh and not documenting it anywhere so that mod authors will have to discover it for themselves, though I was nice enough to fix your wiki for you.

Sir Osis of Liver

Can't imagine why anyone would want to set session length, even if they understood what it meant, which many users probably don't.  Makes no difference to me if SMF fixes it or not - just curious how it happens, as a matter of interest.  Apparently no one here knows, or cares.

"It's not a bug, it's a feature."

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

                                     - R. Waters

IchBin™

Quote from: Arantor on April 26, 2011, 04:04:22 PM
No, I'm referring to a specific bug in the DB library, where it was decided that it was better to remove the function rather than fix it, oh and not documenting it anywhere so that mod authors will have to discover it for themselves, though I was nice enough to fix your wiki for you.

Which function is that? Can you point me to this so I can discuss it with the Team? I must have missed it...
IchBin™        TinyPortal

Illori

#8
i think he is talking about this thread he made removed link

Illori


emanuele

It would be interesting to see what IE8 is POSTing in this particular case...

Can you try to add a line:

log_error($_POST['cookielength']);

somewhere at the beginning of the function Login2 (file LogInOut.php) and then check the error log to see what php receive from IE8 when 60 minutes is used?

Thanks! ;)


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Advertisement: