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!
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!
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:
You'll need to import the header & footer.
Hope that helps!
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!
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.
so I don't understand what is the problem.
Your view.php needs to be in the theme that you're using. What is your theme?
The theme I am using is Grain
http://www.concrete5.org/marketplace/themes/grain-theme/...
http://www.concrete5.org/marketplace/themes/grain-theme/...
Huh. Try clearing your cache via the dashboard. Can you link me to your site?
Hello. I can´t even enter the dashboard. I have no way to enter my site.
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.
Does the default.php file exist in the same folder as the view.php file?
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...
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...
Long shot... What's in your .htaccess file in the root of your site?
Hello again everybody. Thanks to pkhighfile all it's ok now. Thank you very much for every answer!!
Please post the solution so that folks wandering by here in the future will find an answer.
I would like to do so, but pkhighfile has fixed it. I don't know how to explain it. Sorry.
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.
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...
I guess this is a rare bug lurking somewhere in the core...
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.
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.
Well, I'm sure I did remove the stuff in Dashboard first!
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");
$v->setThemeByPath('/page_not_found', "your_new_template_name");
just mail me pk.kumar98@gmail or chat with me