Custom Login Page Error

Permalink
Hi there,

I've designed and developed my own custom login page all is working apart from when the user enters the wrong login credentials, it then directs the user back to the old login page.

Any thoughts as to what has gone wrong?

version 5.6.3.4

 
hutman replied on at Permalink Reply
hutman
What does the controller look like for your custom login page?
handyeye10 replied on at Permalink Reply
How would i find out what the controller looks like?

basically what i'm trying to do is have a login page under the url /user_login so that I don't disrupt the login.php core page. I've created the login page all looks good and works when i enter the right credentials in. When I enter the wrong login it goes to /user_login/do_login and it saids this page cannot be found.
hutman replied on at Permalink Reply
hutman
If you didn't copy the login controller along with the login view, then you need to do that and adjust everywhere it redirects to the login page to redirect to your view.
handyeye10 replied on at Permalink Reply
Ok thanks, where is the controller located? and where do i need to copy it to?
hutman replied on at Permalink Reply
hutman
Assuming that you copied the login page from /concrete/single_pages/login.php to /application/single_pages/login.php you would then need to copy the controller from /concrete/controllers/single_page/login.php to /application/controllers/single_page/login.php
handyeye10 replied on at Permalink Reply
right i cant find the Application folder any ideas?
hutman replied on at Permalink Reply
hutman
Where did you put the user_login page you have already created?
handyeye10 replied on at Permalink Reply
i put it concrete/single_pages/user_login

thanks
hutman replied on at Permalink Reply
hutman
You should never add or edit anything in the concrete directory or it will be gone when you upgrade to the newest version.

If you don't have an application folder, create one and put all of your overrides in there.
handyeye10 replied on at Permalink Reply 2 Attachments
Right I've done that now I'm getting an error.
hutman replied on at Permalink Reply
hutman
Ok, I apologize, I didn't read the original post this morning to know you were on 5.6.

Your view should just go into the root single_pages and your controller should just go into the root controllers.
handyeye10 replied on at Permalink Reply
no worries, when you say root do you mean the actual root or under the updates/concrete5.6.3.4/
hutman replied on at Permalink Reply
hutman
Do not put anything in the updates, what I said about adding stuff to the concrete directory is still true.
handyeye10 replied on at Permalink Reply
right I've done that i'm still getting the same error
hutman replied on at Permalink Reply
hutman
Where did you put your files? If you have the cache turned on, have you cleared the cache?
handyeye10 replied on at Permalink Reply 3 Attachments
Please see attached, when i try and clear the cache it gives me this error
hutman replied on at Permalink Reply
hutman
Delete everything in the /files/cache folder, and change the controller name to user_login.php just like your view.
handyeye10 replied on at Permalink Reply
Right that all works now thanks.

I'm back to where I was before though when i put in incorrect login details it goes back to the old login page
hutman replied on at Permalink Reply
hutman
In the controller you need to dadjust everywhere it redirects to the login page to redirect to your view.
handyeye10 replied on at Permalink Reply
ok but all I have in the controller is
<?php
defined('C5_EXECUTE') or die("Access Denied.");
class LoginController extends Concrete5_Controller_Login {    
}