ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

If logged_in conditionals not working in 2.2.1 + IE?

July 26, 2011 12:20pm

Subscribe [6]
  • #1 / Jul 26, 2011 12:20pm

    gaarmaster

    39 posts

    I apologize in advance if this has been posted before, I wasn’t able to find similar topics.

    I upgraded my site to 2.2.1 over the weekend with little to no trouble. I then had to roll back to a previous version yesterday because I realized the following tags don’t seem to work in Internet Explorer 8 when compatibility mode is on.

    {if logged_in}I'm logged in!{/if}
    {if logged_out}I'm logged out!{/if}

    I at first thought it was some custom add-ons I had installed, so I tried removing them from a local development server. That didn’t fix the issue, so I tried it with a fresh install and the same thing is happening.

    If compatibility mode is on when a user logs in, they will not see the code they’re supposed to. If they turn it off, they can view the member-only content without having to login again.

    Has anyone else run in to this? Did something change with these tags that I missed?

  • #2 / Jul 27, 2011 3:54am

    John Henry Donovan

    12339 posts

    gaarmaster,

    I tested this and I can replicate if I switch to compatibility mode after logging in.
    If I clear my cookies and switch to compatibility mode first and then login it works fine.

    Can you try the same please? Maybe setup a quick local install to test first

  • #3 / Jul 27, 2011 11:19am

    gaarmaster

    39 posts

    Hi John,

    Thank you for getting back to me. That worked for me as well on my local install.

    Of course, turning compatibility mode off at that point shows the logged out version of the page.

    I didn’t have this issue in 2.1.x, so I’m not sure what changed since then. Normally I’d think this was a small issue, but judging from the number of panicked calls we received Monday, it effected a lot of our users who have compatibility mode on by default.

    Would this be considered a bug?

  • #4 / Jul 27, 2011 11:54am

    We have this same issue with pages showing as logged out when turning off compatibility mode in ie9.

    Also on version 2.2.1.

  • #5 / Jul 28, 2011 2:56pm

    Kevin Smith

    4784 posts

    gaarmaster and Trapeze Software Inc.,

    It appears that switching on or off Internet Explorer’s Compatibility Mode does indeed kill the ExpressionEngine session, causing the user to be in a logged out state after the switch. Can you confirm that once you’re in Compatibility Mode and log in, the site does consider you logged in? The same for switching off Compatibility Mode?

    If that’s the case, I can definitely see how that’s annoying, but that’s an issue with Internet Explorer instead, and unfortunately a problem with that browser that will affect sessions you have on any site you login to.

  • #6 / Sep 01, 2011 5:53pm

    gaarmaster

    39 posts

    Sorry for the late reply, I moved over to another project for a bit. I did run in to a very similar issue when working in CodeIgniter. Again it had to do with users who had Compatibility Mode on and were getting kicked out of their sessions. Found a thread over at the CI forums that solved my problem for that.

    Can you confirm that once you’re in Compatibility Mode and log in, the site does consider you logged in? The same for switching off Compatibility Mode?

    The results are inconsistent. I just tried it again: turned on compatibility mode, went to login, then went to my test page. It still showed me as logged out. Cleared my cookies, tried again, showed me as logged in. Did the same process without clearing my cookies and it showed me as logged out. Mostly it works fine, but every once in a while I run in to the issue again.

    It is definitely an IE problem, but if a person has compatibility view on by default (which apparently a lot of our users do…  :down: ) it causes an issue, especially when we’re not available to provide support on how to login. So at this point I guess I’ll need to either make a note to users logging in or do a “fix” similar to what I did in CI.

  • #7 / Sep 02, 2011 2:04pm

    Kevin Smith

    4784 posts

    What was the solution you came up with for CI? I’m interested because this definitely sounds like something only the IE team at Microsoft could fix, but if there’s something we can do on our side, I’m all ears!

  • #8 / Sep 02, 2011 3:27pm

    gaarmaster

    39 posts

    Hey Kevin,

    I ended up just having to turn off the “match user agent” setting in CI. It seems like if a user has compatibility mode on, their user agent can change slightly on each page request, thereby killing the session.

    What was happening was that a user in compatibility mode could login, but as soon as they tried to click another link, they got kicked out. Not quite the same thing that’s going on in EE right now, but very similar.

  • #9 / Sep 03, 2011 12:50am

    Kevin Smith

    4784 posts

    Thanks for the update. Did that not have an adverse affect on other users’ session experiences?

  • #10 / Sep 15, 2011 11:02am

    IOS Admin

    33 posts

    So how am I supposed to fix this? I can’t login from IE9 no matter what I do.

    How am I supposed to expect users to login?

    Glad I’m not actually using user login at this point.

  • #11 / Sep 15, 2011 11:10am

    IOS Admin

    33 posts

    Actually this is only a problem on my dev site. I’ll ignore it for now and continue to use Chrome.

  • #12 / Sep 15, 2011 4:25pm

    Kevin Smith

    4784 posts

    Sounds good, IOS Admin. I’ll close this up for now since it sounds like everyone’s all set. If you continue to have issues with this, please open up a new thread by clicking the button below!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases