View.php not being found.

Permalink
Created a site for a client that didn't want a blog so I created a very minimal theme. Now they want a blog so I'm putting the necessary files into the theme.

Now when I try to create a blog post I get an error that it couldn't find the view.php file, but it is there. I cleared the cache and still having issues.

Anyone know how to solve this?? Thanks!

 
DAkers replied on at Permalink Reply
Hey Antl1881,

I believe more information will need to be provided to figure out whats going on. Is the blog post a block? Is it a page type? Posting the error will help as well.
Antl1881 replied on at Permalink Reply
Hey DAkers,

It's a page type. I created the blog_entry.php and the view.php in the theme and put the blog_index.php into blocks/page list/.


The Full Error is:

"File /home/monarch/public_html/concrete/themes/Monarch_RM/view.php not found. All themes need default.php and view.php files in them. Consult concrete5 documentation on how to create these files."

This is my first site with C5, giving it a try over WP, so I've been piecing together what files I need and where they need to go from different posts, etc.
DAkers replied on at Permalink Reply
Does your page type controller have the correct naming in the class declaration? Also, is that file path the error is giving the correct path (like case sensitive wise)?

And just to be sure as well, this error only appear when you try to add a page with this type? It does not happen anywhere else and the website loads up fine?
DAkers replied on at Permalink Reply
Also, if blog_index.php is your controller for the page type, it should go under controllers/page_types and be named the same as blog_entry.php

page_list is a block, not where page types go.
bbeng89 replied on at Permalink Reply
bbeng89
When this has happened to me in the past I removed the theme then reinstalled it and that seemed to fix it. I would give that a shot.
Antl1881 replied on at Permalink Reply
Thanks, tried it and didn't work.
Remo replied on at Permalink Reply
Remo
Depending on the concrete5 version you're using, not everything is cleared when you hit "clear cache". Have you tried to disable the "override cache"? It's often the cause of such issues.
Antl1881 replied on at Permalink Reply
Success! I moved the blog_index.php under controllers/page_type and renamed it. Then I changed the settings in Override Cache and now it's working.

Thanks a lot guys, I really appreciate it!