Login error display
Permalink 1 user found helpful
When I use my theme to wrap the login/register, etc, pages, if I enter an invalid login, it isn't showing the error message. It works if I'm not wrapping in my theme though. Am I missing something?
I'm not using a custom view.php for login. I only set the config file to use my theme as a wrapper for the existing login (register, etc.). Do I need to create a view.php? Thanks.
I guess so!
Hmm, seems I found a road block. So I did have a view.php file in my themes folder. I tried adding that code block to it before the <innerContent> php tag, but then the page didn't display at all.
Can you explain a bit more about how you're going about creating this login page?
The reason I ask is that the 'normal' way is to override the core login page by putting a copy of the login.php file found at "root/concrete/single_pages" into "root/single_pages" and start tinkering from there.
I'm sure there are a gazillion other ways to make a custom login page but why re-invent the wheel. ;)
The reason I ask is that the 'normal' way is to override the core login page by putting a copy of the login.php file found at "root/concrete/single_pages" into "root/single_pages" and start tinkering from there.
I'm sure there are a gazillion other ways to make a custom login page but why re-invent the wheel. ;)
All I did was set the commented out override in site_theme_paths.php to be active and changed the theme location to the active theme. The login/register pages were then wrapped in the custom theme. However, the error display is not working.
Sounds reasonable. I guess it depends on how much customizing you want to do. Here are a couple of forum discussions that might help.
http://www.concrete5.org/community/forums/themes/customizing-login-...
Video explanation by Tallacman:
http://performancec5.com/how-to/styling-the-login-page/...
http://www.concrete5.org/community/forums/themes/customizing-login-...
Video explanation by Tallacman:
http://performancec5.com/how-to/styling-the-login-page/...
If you're still having trouble with this, could you attach your view.php so I could have a look at it? You might have to rename it view.txt to attach it in these forums.
I noticed the same issue on another site, so I'm missing a step to be able to completely wrap the login/register pages in my theme. I attached view from the original site in question.
I guess I need your header.php and your footer.php as well to get the whole picture.
Here are the header and footer too.
What display problems are you having. Can you post a screenshot?
You don't have any open tags but you have used '<ul id="subnavlist">' in 3 different places. ID's must only be used only be used once per page. I believe this will cause the css to only style the first element. Since these <ul>'s are in your nav, I'm pretty sure your nav will not display properly. You might already know this but to fix it, change them to '<ul class="subnavlist">' in your HTML and change the css so that #subnavlist becomes .subnavlist.
One quick question that's off topic... Is there a reason why you are hard-coding the navigation structure? Part of the beauty of C5 is that the autonav block handles all the menu structure so that when you add pages to your site, they automagically get added to your navigation structure.
You don't have any open tags but you have used '<ul id="subnavlist">' in 3 different places. ID's must only be used only be used once per page. I believe this will cause the css to only style the first element. Since these <ul>'s are in your nav, I'm pretty sure your nav will not display properly. You might already know this but to fix it, change them to '<ul class="subnavlist">' in your HTML and change the css so that #subnavlist becomes .subnavlist.
One quick question that's off topic... Is there a reason why you are hard-coding the navigation structure? Part of the beauty of C5 is that the autonav block handles all the menu structure so that when you add pages to your site, they automagically get added to your navigation structure.
I'm just not getting the error message when a login is invalid. I'll reply with screen shot, but there's nothing to show as the page looks like it just refreshes on invalid login attempt.
Thanks on the multiple <ul id=subnavlist> tags. I will fix that.
I was on a deadline and am still new to c5, so after trying to get the jquery nav menu to work right using the autonav block, I switched to hard coding. I will try again now that I have more time.
Thanks!
Thanks on the multiple <ul id=subnavlist> tags. I will fix that.
I was on a deadline and am still new to c5, so after trying to get the jquery nav menu to work right using the autonav block, I switched to hard coding. I will try again now that I have more time.
Thanks!
I'm not finding any glaring issues that would stop the error messages from showing up but I would try to simplify things to try to troubleshoot this.
I have attached a very simple view.php file. Try temporarily renaming your view.php and placing the attached view.php file in your theme directory and see what happens.
This file does not call your header.php or footer.php so you won't have your navigation. It's just to try to cut out as many variables as possible so we can find the culprit.
I have attached a very simple view.php file. Try temporarily renaming your view.php and placing the attached view.php file in your theme directory and see what happens.
This file does not call your header.php or footer.php so you won't have your navigation. It's just to try to cut out as many variables as possible so we can find the culprit.
Hmm, interesting.
So I put your view.php code in place of my theme's view.php, and no change to the login or register pages (doesn't appear to be using my view.php file or something). Still doesn't show errors also.
I cleared cache and reinstalled theme through dashboard, to be sure.
Edit: Grr, hold-on, it doesn't look like my upload change for view.php took.
Edit2: Ok, Dreamweaver wasn't updating the file, so I just updated it using FileZilla. You can see by entering a random (non registered user) that it doesn't show any error messaeges:
http://digital-nw.com/pndc/c5/index.php/login/do_login/...
So I put your view.php code in place of my theme's view.php, and no change to the login or register pages (doesn't appear to be using my view.php file or something). Still doesn't show errors also.
I cleared cache and reinstalled theme through dashboard, to be sure.
Edit: Grr, hold-on, it doesn't look like my upload change for view.php took.
Edit2: Ok, Dreamweaver wasn't updating the file, so I just updated it using FileZilla. You can see by entering a random (non registered user) that it doesn't show any error messaeges:
http://digital-nw.com/pndc/c5/index.php/login/do_login/...
You're going to be upset...
Try this:
Try to log in with a bad login. After the page refreshes, use your mouse to highlight the area just under your "Reset and Email password" button.
Your error message shows up as black text on a black background.
Try this:
Try to log in with a bad login. After the page refreshes, use your mouse to highlight the area just under your "Reset and Email password" button.
Your error message shows up as black text on a black background.
I could hope for it to be that! (and it may still be), but here is what I see after I click sign in after entering a bad login (attached).
It's all the default text (no error messages).
It's all the default text (no error messages).
You're right, I got excited!! I thought I was seeing the error response back. Sigh!
I got excited too lol. Thanks for the help.
First, thanks to Job, as he was on the right track, but I guess Concrete5 uses the following tag for newer versions:
<?php Loader::element('system_errors', array('error' => $error)); ?>
This did the trick. I missed this when I was searching documentation previously. Thanks for all your replies!
<?php Loader::element('system_errors', array('error' => $error)); ?>
This did the trick. I missed this when I was searching documentation previously. Thanks for all your replies!
AAGH! I don't know how I missed it. The view.php I attached a couple of posts ago was a stripped down version of my actual view.php. When I saw your solution, I checked my full view.php and that magical line is in there:
I stripped it out trying to eliminate as many variables as possible. Sorry, I cost you a few days.
Glad it's working.
I stripped it out trying to eliminate as many variables as possible. Sorry, I cost you a few days.
Glad it's working.
For concrete5.8. The system error is under /concrete/themes/core/error.php. If you want to customise the error page, you need to copy error.php and paste at /application/themes/core/error.php(NOTE: it is not under /application/themes/yourtheme/error.php). Then you can style the page.
Hope this helps - be sure to mark it as an answer if it does.
Job.