Login error - File not found. All themes need default.php and view.php files in them.

Permalink 1 user found helpful
Kinda weird (and long) tale, but here it goes...
- I had customized my login page (by modifying the config\site-theme-path file) to use a customized "Slate" theme... used successfully for months.
- Upon applying an update to concrete5 and multiple add-ons and themes, the login page changed from my custom page to Flexcrete theme (which i have installed but never used). I looked and couldn't find where it was happening so I uninstalled Flexcrete (hoping it would revert to my custom page or to a default Concrete5 page).
- Now when I navigate tohttp://www...index.php/login, I get the error... File not found. All themes need default.php and view.php files in them.
- I've tried specifying two different themes in the config\site-theme-path file, and also overwrote that file with the one that ships with Concrete5, to no avail.
- The theme I am using for my website is Slate and it contains both of these files.

Where else can I look to see which theme Concrete5 is trying to load for my login page (as well as all system pages)?

 
tallacman replied on at Permalink Reply
tallacman
Assuming you uninstalled it in the c5 interface, Have you tried clearing cache and rebuilding the database structure?
SiteQwester replied on at Permalink Reply
No I haven't. Would you point me in the right direction? Not sure how to do that outside of the dashboard. ~Thanks
tallacman replied on at Permalink Reply
tallacman
Did you unistall the theme or just delete it from your server. I get the feeling you uninstalled it, right?
SiteQwester replied on at Permalink Reply
I uninstalled it via the dashboard, the theme still resides on the server in the root/packages directory.
SiteQwester replied on at Permalink Reply
Anyone else ???
I guess I'm looking for a road map for where/what Concrete5 looks at to display system pages(log in page), where it finds the theme info?

~Thanks much... I cannot log in to my dashboard.
JohntheFish replied on at Permalink Reply
JohntheFish
Have you removed the custom login, returning login to the default?
SiteQwester replied on at Permalink Reply
Yes, as far as I know... I have returned "root\config\site-theme-path.php" to it's default.

I've noticed that root\concrete\config\theme_paths.php contains the following...
$v = View::getInstance();
// TODO - make this honor * better, actually work for more than just dashboard
$v->setThemeByPath('/dashboard', 'dashboard');
$v->setThemeByPath('/dashboard/*', 'dashboard');
$v->setThemeByPath('/page_forbidden', VIEW_CORE_THEME);
$v->setThemeByPath('/page_not_found', VIEW_CORE_THEME);
$v->setThemeByPath('/install', VIEW_CORE_THEME);
$v->setThemeByPath('/login', VIEW_CORE_THEME);
$v->setThemeByPath('/register', VIEW_CORE_THEME);
$v->setThemeByPath('/maintenance_mode', VIEW_CORE_THEME);

and am wondering what "view_core_theme" refers to???
TechnatomyClient replied on at Permalink Reply
I received a similar message when I tried to apply a custom theme to the login page from the book concrete5 Beginner's Guide.

I get the error:

File C:\Users\dclee\Desktop\wamp\www\concrete/themes/c5book/view.php not found. All themes need default.php and view.php files in them. Consult concrete5 documentation on how to create these files.


Note that the forward slashes are changing to backslashes halfway through. I think thats the issue.


I can set /config/site_theme_paths.php back to:
<?php
defined('C5_EXECUTE') or die(_("Access Denied."));


But I'm trying to figure out how to assign a custom theme to my login page without generating that error.
SiteQwester replied on at Permalink Best Answer Reply
SOLVED... though not sure why.
-After viewing every php file I could find on my server, I started investigating the database.
-Went to phpmyadmin and in the "packages" table, noticed that "FlexCrete" theme had an entry of "1" (active or installed I presume) after I had uninstalled it through the Dashboard. I changed it to "0" and now am able to log in to the Dashboard again.

Hooray!!!

...again, not sure why or how, but it worked for me. Hope this helps someone else down the road.
cryophallion replied on at Permalink Reply
It totally did help someone else (namely me).... and this seems like a glaring bug that when you switch themes flexcrete still hijacks the login page.

I'll have to look and see if there is a way to fix this issue, and try to contact the developer if there is one
Skool replied on at Permalink Reply
Thanks for posting this solution! Amazing that you found it, totally saved me.