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.

Custom field causing login loop

December 13, 2011 7:38pm

Subscribe [2]
  • #1 / Dec 13, 2011 7:38pm

    sartaingerous

    8 posts

    Hello,
    I want to rip my hair out.

    The company I work for has a series of videos used for training in our software. These are free, and the user must sign up in order to use them. We use the standard member sign up form, and login. The pages and lessons are hidden to those not logged in, there are no member groups or anything like that.

    Everything was working fine last week, as this was not the first time we have run this course (it is only open for small periods of time). On Friday of last week, I added a custom field for the pages so that I can exclude them from an RSS template so they won’t be searchable.

    This broke the login form.

    Now it will get stuck in a loop and never let you get past the login page. I took the pages that are affected, and changed the custom field to No instead of Yes, hoping that would fix it. Wouldn’t you know it, it was fixed!

    For a very short time. It broke again. I have no idea why this would affect logging in since the RSS is its own template, and it was just a simple custom field being used. On a whim, I decided to remove the line of code that searches for the custom field in the RSS template, and voila! It is working again.

    I can only assume that it will break again at this point. So my question is why would this break it? And is there a way to have them play nicely with each other? There are several pages we don’t want searchable and that can’t be done right now apparently. On a side note the only other thing that was changed was I enabled gzip, but changing that around didn’t seem to do anything.

    Any help is greatly appreciated.

    Thanks!

  • #2 / Dec 14, 2011 10:36am

    Rob Allen

    3118 posts

    It sounds as if there might be an error in the template. Did you change anything in the template that has the login form in it?

    Can you post the template code for your login form template and the template that display the content?

  • #3 / Dec 14, 2011 12:22pm

    sartaingerous

    8 posts

    Templates weren’t touched. Here is the login form:

    <div id="dts-login-form">
     <h2>Please Login to Your Account</h2>
    <p> {exp:member:login_form return="site/index" return="{embed:return}"}<br />
      <label>Username</label><br />
      <input type="text" name="username" value=""  maxlength="32" class="input" size="25" /></p><br />
      <label>Password</label><br />
      <input type="password" name="password" value="" maxlength="32" class="input" size="25" /></p><br />
      {if auto_login}<br />
       <input class='checkbox' type='checkbox' name='auto_login' value='1'  /> Auto-login on future visits<br />
      {/if}<br />
      <input type="submit" name="submit" value="Submit" /></p><br />
      <a href="http://{path=users/forgot_password}">Forgot your password?</a><br />
     {/exp:member:login_form}<br />
    </div>

    The code that displays the form on the template is simply:
    { embed="_forms/dts_registration_form" }

    Again, neither of these had been touched.

    Yesterday I removed the search parameter from the RSS template and that temporarily fixed it, but now it is broken again. What else is weird is it seems to work for a few of the lessons we have, but wont let you log into the dashboard page or the first lesson.

  • #4 / Dec 14, 2011 12:26pm

    sartaingerous

    8 posts

    Sorry, wrong code for the form display…

    { embed="_forms/login_form" return="{page_uri}” }

  • #5 / Dec 14, 2011 12:42pm

    sartaingerous

    8 posts

    As I scramble to fix this, I removed the custom field I had added. And again, I can log in now. Every time I make a change to anything having to do with the custom field it temporarily fixes the problem.

    Now I wait to see if it breaks again.

  • #6 / Dec 14, 2011 1:09pm

    sartaingerous

    8 posts

    Broke again.

  • #7 / Dec 14, 2011 8:00pm

    sartaingerous

    8 posts

    Looks like it was an issue with the page caching, seems to be fixed now.

    I noticed a few people had a similar problem and the threads were closed, so if you make your way here, disable the caching for the login pages!

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

ExpressionEngine News!

#eecms, #events, #releases