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.

Member Log-in Defaulting to Control Panel

February 21, 2012 9:37pm

Subscribe [3]
  • #1 / Feb 21, 2012 9:37pm

    cafemaster

    3 posts

    I’ve added a member log-in form to a page using:
    {exp:member:login_form return="myfolder/mypage"}

    But the log-in form created keeps trying to log the member into the control panel—which they don’t have access to, so all they get is a “You are not authorized to perform this action” error.

    If I look at the page source created by the tag, it creates a form action with “/admin.php/” appended to the end of the site’s domain:
    <form method=“post” action=“http://premier.ehclients.com/admin.php/”  >

    I’ve done this same exact thing with other EE sites, and on those sites the {exp:member:login_form} tag creates a form action that points to the site’s home page—  without the /admin.php appended onto the end.

    Is there some configuration/setting that is causing this behavior by the {exp:member:login_form} tag?

  • #2 / Feb 22, 2012 9:24am

    zizther

    228 posts

    There shouldn’t be any config settings that would be causing this issue.
    Have you made sure the Members module installed.

    Are you use .htaccess, if so make sure this is not affecting anything.

  • #3 / Feb 22, 2012 7:09pm

    cafemaster

    3 posts

    Member management module is installed, and I created one member (non-admin) username to test with. The only thing in the htaccess file is the code to eliminate index.php from URLs.

    Like I said - did EXACTLY the same thing on a different EE installation 2 weeks ago and it worked fine. Even tried copying the code from that other site - no change.

    The EE code just wants to make the log-in form action=“domainname.com/admin.php” for some strange reason.

    Feel free to see for yourself:

    Login page: http://premier.ehclients.com/vrmanager/

    The EE code on that page is:
    {exp:member:login_form return="vrmanager/showhomes"}
    <table align=“center” border=“0” cellpadding=“0” cellspacing=“24”>
    <tr>
      <td class=“login-form-head”>eMail Address:</td>
      <td class=“login-form-value”><input name=“username”>/td>
    </tr>
    <tr>
      <td class=“login-form-head”>Password:</td>
      <td class=“login-form-value”><input name=“password”></td>
    </tr>
    </table>
    <div align=“center”>
    <input type=“submit” name=“submit” class=“log-in-submit” value=“log-in”></p>
    {if auto_login}<input type=“checkbox” name=“auto_login” value=“1”> Auto-login on future visits{/if}
    Forgot your password?
    </div>
    {/exp:member:login_form}

  • #4 / Feb 22, 2012 10:38pm

    Cheif

    626 posts

    All I can think of is that in your config settings, you have admin.php instead of index.php as the URL should only ever be the URL/index.php (or nothing if htaccess removal)

    I’d remove htaccess for all testing. It sounds silly I know, but you have to get back to the barest of bones regardless of how confident you feel.

    I noticed also on that site you have/had some PHP code in play as well. Whilst it shouldn’t cause any issues I’d be scratching ma noodle on that one

  • #5 / Feb 23, 2012 11:30am

    Shane Eckert

    7174 posts

    Hello cafemaster,

    I am sorry to hear you are running into this problem.

    What version are you using in both the current install and the one from 2 weeks ago?

    Cheif raises a good point, I would check your config settings as well as path to make sure you are pointing to index or nothing and not admin.php, which it sounds like you might be.

    Let me know what you find.

    Cheers,

  • #6 / Feb 24, 2012 10:54am

    cafemaster

    3 posts

    Yup - duh. The “URL to the root directory of your site” had the admin.php at the end. Not sure how it got that way, but problem fixed

  • #7 / Feb 24, 2012 11:24am

    Shane Eckert

    7174 posts

    Hey cafemaster,

    No worries! That’s why we are here. It happens to the best of us!

    Glad you are up and running. Happy Friday!!

    Cheers,

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

ExpressionEngine News!

#eecms, #events, #releases