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_out} being ignored

October 02, 2010 2:08pm

Subscribe [4]
  • #1 / Oct 02, 2010 2:08pm

    margaret1985

    18 posts

    Even when I test in another browser and I’m clearly logged out, EE still recognizes me as logged in and displays the logged in content. I’ve hit a road block here. Thanks!

    {if logged_in}
                      <div class="button">
                        <div class="gutter"><a href="http://{path=assessment/index}">Take Assessment</a></div>
                      </div>
                      {/if}
                      
                      {if logged_out}
                      Please Login to View the Assessment.
                      Are you a member? If so, please <a href="http://{path=member/login}">log-in</a>.
                      Not a member? Please <a href="http://{path=member/register}">register</a>.
                      Have you <a href="http://{path=member/forgot}">forgotten your password</a>?
                      {/if} 
                      
                      {if logged_out}
  • #2 / Oct 02, 2010 2:46pm

    margaret1985

    18 posts

    I put the above code in a global variable and at least now I see everything, but EE is still not recognizing my tags

    http://www.test.itowecoaching.com/index.php/online_Coaching

  • #3 / Oct 04, 2010 2:20am

    John Henry Donovan

    12339 posts

    margaret1985,

    What version and build of EE are you using?

    I put the above code in a global variable and at least now I see everything, but EE is still not recognizing my tags

    They will not work in a Global Variable. They will need to be put inside a template. Can you add it back into a template please? Is this how you were doing it before?

    You have two opening {if logged_out} tags in your code above

  • #4 / Oct 04, 2010 4:09pm

    margaret1985

    18 posts

    Thank you, I returned the code to the template. You are right, I accidentally copied some test code I had below. Again, here is what I am using on the template level and I’m testing in Firefox, while logged in and in Safari—-logged out. In Safari I still see the content as I should (take assessment) if I’m logged in.

    <h2> Take your assessment </h2>
    <p>                  Start your conversation with a complimentary assessment and 30 minute interview with Glenn. <br />
                      {if logged_in}<br />
                      <div class="button"><br />
                        <div class="gutter"><a href="http://{path=assessment/index}">Take Assessment</a></div><br />
                      </div><br />
                      {/if}<br />
                      <br />
                      {if logged_out}<br />
                      Please Login to View the Assessment.<br />
                      Are you a member? If so, please <a href="http://{path=member/login}">log-in</a>.<br />
                      Not a member? Please <a href="http://{path=member/register}">register</a>.<br />
                      Have you <a href="http://{path=member/forgot}">forgotten your password</a>?<br />
                      {/if}

  • #5 / Oct 04, 2010 4:10pm

    margaret1985

    18 posts

    I’m using v2.1.0

  • #6 / Oct 05, 2010 2:30am

    John Henry Donovan

    12339 posts

    margaret1985,

    Please create a new blank template and only add the code you are usign above and nothing else.
    Then let us see a link back to it please.

    It may be something else in your original template throwing this off as I have tested your code in a blank template like I suggested and it works fine

  • #7 / Oct 05, 2010 9:09am

    margaret1985

    18 posts

    Strange it worked for you because I put the code in a blank template and I still don’t see the login request

    {if logged_out}
                      Please Login to View the Assessment.
                      Are you a member? If so, please <a href="http://{path=member/login}">log-in</a>.
                      Not a member? Please <a href="http://{path=member/register}">register</a>.
                      Have you <a href="http://{path=member/forgot}">forgotten your password</a>?
                      {/if}

    when I’m logged out in a completely different browser. I thought maybe it was something to do with me being a super admin—but I am testing in safari where I’ve never even logged in before.

    http://www.test.itowecoaching.com/index.php/eLearning/test

  • #8 / Oct 05, 2010 4:09pm

    Ingmar

    29245 posts

    I am seeing the same thing and I am certainly not logged in. Can you try to add

    {logged_in_group_id}
    {logged_in_username}

    to your template? What do you get?

  • #9 / Oct 05, 2010 5:24pm

    margaret1985

    18 posts

    Interesting, when I insert {logged_in_group_id} {logged_in_username} I see another username and group id that is a content author in both browsers when I am LOGGED OUT. This seems like I have some sort of security or cookie setting that should be changed in my EE control panel.

  • #10 / Oct 06, 2010 3:51am

    John Henry Donovan

    12339 posts

    margaret1985,

    What build are you on? You can find this in the very bottom of your control panel footer.

    If not on 20100810,can you do a build update please?

  • #11 / Oct 08, 2010 2:09pm

    margaret1985

    18 posts

    Thank you John, I updated to 20100810 and am no longer having the problem. Next time, I’ll make sure this is the first action I take before making a post. Thank you!

  • #12 / Oct 09, 2010 11:00am

    Sue Crocker

    26054 posts

    Glad that the build update fixed the problem. Don’t hesitate to post again as needed.

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

ExpressionEngine News!

#eecms, #events, #releases