Help: an unexpected error occurred default.php and view.php

Permalink
Hello.
I can't enter to edit my site. It says:

An unexpected error occurred.
File not found. All themes need default.php and view.php files in them. Consult concrete5 documentation on how to create these files.
< Back to Home

How can I fix? Please help! I can't loose all my web!

frankysev
 
pkhighfile replied on at Permalink Best Answer Reply
pkhighfile
i help you
just mail me pk.kumar98@gmail or chat with me
rainmaker replied on at Permalink Reply
rainmaker
All themes need a default.php and view.php.

Default can just be a copy of any of your page templates and view.php can be the same but instead of an editing area (for example, $a = new Area('Main'); $a->display($c);), just put this in the file:

echo $innerContent;


You'll need to import the header & footer.

Hope that helps!
frankysev replied on at Permalink Reply
frankysev
Thanks for your answer. I can see with filezilla than the file view.php is still there in the /packages/grain/themes/grain
so I don't understand what is the problem.
rainmaker replied on at Permalink Reply
rainmaker
Your view.php needs to be in the theme that you're using. What is your theme?
frankysev replied on at Permalink Reply
frankysev
rainmaker replied on at Permalink Reply
rainmaker
Huh. Try clearing your cache via the dashboard. Can you link me to your site?
frankysev replied on at Permalink Reply
frankysev
Hello. I can´t even enter the dashboard. I have no way to enter my site.
rainmaker replied on at Permalink Reply
rainmaker
Hmmmm...I would try to wipe the site and place a fresh install of C5. If you can't even get to the login page, that's really odd.
enlil replied on at Permalink Reply
enlil
Does the default.php file exist in the same folder as the view.php file?
frankysev replied on at Permalink Reply
frankysev
Hello enlil.
Yes, the default.php file exists in the same folder as the view.php file.

As I replied to rainmaker, I can´t enter the dashboard.
I think it´s a problem with the login´s default screen, not the theme.

You can see the site athttp://okclasesparticulares.com...
but the error splash if you try to enterhttp://okclasesparticulares.com/index.php/login...
mhawke replied on at Permalink Reply
mhawke
Long shot... What's in your .htaccess file in the root of your site?
frankysev replied on at Permalink Reply
frankysev
Hello again everybody. Thanks to pkhighfile all it's ok now. Thank you very much for every answer!!
mhawke replied on at Permalink Reply
mhawke
Please post the solution so that folks wandering by here in the future will find an answer.
frankysev replied on at Permalink Reply
frankysev
I would like to do so, but pkhighfile has fixed it. I don't know how to explain it. Sorry.
mhawke replied on at Permalink Reply
mhawke
Hey pkhighfile!! Let us know how you fixed the problem. The purpose of this forum is to provide answers for everyone, now and into the future.
hliljegren replied on at Permalink Reply
hliljegren
I had the same problem and found this thread, but as no real solution was given I started to dig through my site. I found that I had two previous themes that I had installed but then removed. They were still existing in the database table "Packages". After removing the two lines in the database my site is up and running again. Can't say that this is a complete solution but my thought was that concrete5 might be looking for the files in some other theme directory as I had both default and view.

I guess this is a rare bug lurking somewhere in the core...
mhawke replied on at Permalink Reply
mhawke
Not sure I would define it as a bug but the error message could sure be more verbose.

It depends on how the themes (or any add-ons for that matter) are removed. Some folks think you can just delete the folders from the underlying file structure but that leaves orphaned pointers to non-existent files still in the database. Everything that was installed through the Dashboard needs to be removed through the Dashboard BEFORE removing the underlying files.
hliljegren replied on at Permalink Reply
hliljegren
Well, I'm sure I did remove the stuff in Dashboard first!
losttheplot replied on at Permalink Reply
If you're getting this error in your logs and have recently changed the name of your theme in your file-tree and database, don't forget that you also need to update /config/site_theme_paths.php line 6 to:

$v->setThemeByPath('/page_not_found', "your_new_template_name");