No error message when invalid login attempt

Permalink 1 user found helpful
I created a single page where I pasted the code from the login.php, to get my theme design for the login page aswell.

I've only done slight modifications, mostly for design purposes. It all works well when I log in with correct credentials, but when I try to login with no password entered or wrong username/password, I get redirected to my "custom" login page, but no error message is displayed.

The only PHP code I've altered what I can remember is the form action from the usual $this->url('/login', 'do_login') to $this->url('/my_login', 'do_login').

The code for the controller is straight off ripped from the default file.

Anyone got a clue where it all goes wrong?

Cheers!

/m

 
jordanlev replied on at Permalink Best Answer Reply
jordanlev
Yes, this unfortunately will always happen when you customize the system pages (login, registration, etc.) -- you need to add the error message output to your custom page -- see this thread:
http://www.concrete5.org/community/forums/chat/custom-register-page...

(the very last post in that thread has the most succinct solution, but if that doesn't work for some reason try the more verbose solution that appears in the middle of the thread).

Not sure why this isn't in the c5 docs (I tried adding it but was rejected -- boo hoo).

-Jordan
jordanlev replied on at Permalink Reply
jordanlev
Oh, by the way, unless you're trying to do something extra-special, you shouldn't create a different login page but rather override the system login page. See that post I linked to above for more details (especially the part about setting your config/site_theme_paths.php file)
mackzor replied on at Permalink Reply
Yeah, I should probably do it this way instead. And your first post answered my stated problem :)

Thanks man!
AngusHume replied on at Permalink Reply
AngusHume
I could not get the above solution to work, but the following one did...
http://www.concrete5.org/community/forums/usage/theme-for-registrat...