$this->inc('elements/header.php'); not working

Permalink 2 users found helpful
I decided to jump back into learning Concrete5 so I've been going through the very helpful videos in the "Theme Development" section and I have run into a problem, that I can't figure out. When I try to include a header.php using this code from the video:

<? $this->inc('elements/header.php'); ?>


I get this error message saying the it couldn't locate the file.

Warning: include(/Applications/MAMP/htdocs/phpLocalhost/concrete5.6.2/concrete/themes/lostdog/elements/header.php): failed to open stream: No such file or directory in /Applications/MAMP/htdocs/phpLocalhost/concrete5.6.2/concrete/core/libraries/view.php on line 484

However when I just use a regular
<? include('elements/header.php'); ?>

the header loads as expected. Can someone explain to me what is going on here? I do have my theme in the correct folder (concrete5.6.2/themes/mytheme/elements)but the error message seems to say that inc(); is pointing to /concrete5.6.2/concrete/themes/mytheme/elements/.

Any help would be appreciated.

scottM1164
View Replies: View Best Answer
bbeng89 replied on at Permalink Reply
bbeng89
Hmm, that should be correct... I know this is kind of the c5 equivalent of "turning it off and back on again", but have you tried clearing out the concrete5 cache?
scottM1164 replied on at Permalink Reply
scottM1164
Yeah that's why I'm so baffled by this. I don't know how to clear the C5 cache, how is that done? I'll give it a shot and see if that helps.
ScottSandbakken replied on at Permalink Reply
ScottSandbakken
User your FTP client to remove the [root]/files/cache and [root]/files/tmp folders, then reload the page if the standard "Clear Cache" doesn't work.
bbeng89 replied on at Permalink Best Answer Reply
bbeng89
The easiest way to get to it is to just type "Clear Cache" in the intelligent search in the admin bar. You can also get there by going to Dashboard > System & Settings > Clear Cache. For development, most people go into Dashboard > System & Settings > Cache & Speed Settings, and turn off caching so that it doesn't become a problem. Then when you launch your site you can turn it back on.
scottM1164 replied on at Permalink Reply
scottM1164
Clearing the cache seems to have fix the problem! I've switched off the cache for now and will turn it on if I ever go live with this test template.

Thanks a lot gents!
ballgood replied on at Permalink Reply
Did all of that but still not working for me this is the text i get from my site.

Warning: include(C:\webroot\Excelsior/packages/lucid/themes/lucid/elements/header-meta.php): failed to open stream: No such file or directory in C:\webroot\Excelsior\concrete\core\libraries\view.php on line 484 Warning: include(): Failed opening 'C:\webroot\Excelsior/packages/lucid/themes/lucid/elements/header-meta.php' for inclusion (include_path='C:\webroot\Excelsior/libraries/3rdparty;C:\webroot\Excelsior\concrete/libraries/3rdparty;.;C:\php\pear') in C:\webroot\Excelsior\concrete\core\libraries\view.php on line 484 Warning: include(C:\webroot\Excelsior/packages/lucid/themes/lucid/elements/header.php): failed to open stream: No such file or directory in C:\webroot\Excelsior\concrete\core\libraries\view.php on line 484 Warning: include(): Failed opening 'C:\webroot\Excelsior/packages/lucid/themes/lucid/elements/header.php' for inclusion (include_path='C:\webroot\Excelsior/libraries/3rdparty;C:\webroot\Excelsior\concrete/libraries/3rdparty;.;C:\php\pear') in C:\webroot\Excelsior\concrete\core\libraries\view.php on line 484
Warning: include(C:\webroot\Excelsior/packages/lucid/themes/lucid/elements/areas/main/main-full.php): failed to open stream: No such file or directory in C:\webroot\Excelsior\concrete\core\libraries\view.php on line 484 Warning: include(): Failed opening 'C:\webroot\Excelsior/packages/lucid/themes/lucid/elements/areas/main/main-full.php' for inclusion (include_path='C:\webroot\Excelsior/libraries/3rdparty;C:\webroot\Excelsior\concrete/libraries/3rdparty;.;C:\php\pear') in C:\webroot\Excelsior\concrete\core\libraries\view.php on line 484 Warning: include(C:\webroot\Excelsior/packages/lucid/themes/lucid/elements/areas/main/main-four-columns.php): failed to open stream: No such file or directory in C:\webroot\Excelsior\concrete\core\libraries\view.php on line 484 Warning: include(): Failed opening 'C:\webroot\Excelsior/packages/lucid/themes/lucid/elements/areas/main/main-four-columns.php' for inclusion (include_path='C:\webroot\Excelsior/libraries/3rdparty;C:\webroot\Excelsior\concrete/libraries/3rdparty;.;C:\php\pear') in C:\webroot\Excelsior\concrete\core\libraries\view.php on line 484
Warning: include(C:\webroot\Excelsior/packages/lucid/themes/lucid/elements/footer.php): failed to open stream: No such file or directory in C:\webroot\Excelsior\concrete\core\libraries\view.php on line 484 Warning: include(): Failed opening 'C:\webroot\Excelsior/packages/lucid/themes/lucid/elements/footer.php' for inclusion (include_path='C:\webroot\Excelsior/libraries/3rdparty;C:\webroot\Excelsior\concrete/libraries/3rdparty;.;C:\php\pear') in C:\webroot\Excelsior\concrete\core\libraries\view.php on line 484