Warning: include

Permalink 2 users found helpful
Hello,

I'm following tutorials converting a plain html to concrete5 using the latest 5.6.0.1 version.

I've done this many times with other themes with no issues, but this is first time creating from scratch using latest version.

When I create the default.php with the loader header and loader footer elements the site works just fine, as I'm able to edit blocks and everything within the full default.php.

Problem and issue is when I try to split the default.php into header and footer sections I get an error saying something about line 418 on view.php (please see attached).

Now this happens when I create the header and footers, place them in the elements folder with their appropriate code (I know the code is right because when I place same back into default.php, site works fine).

For some reason this include
<?php 
defined('C5_EXECUTE') or die("Access Denied.");
$this->inc('elements/header.php'); ?>
breaks the site and I can't figure out why because the same code works on all other sites.

Any help would be appreciated as always, and please let me know if I need to include additional info.

1 Attachment

 
sabumnimdk replied on at Permalink Reply
sabumnimdk
Hi grfirst

This is a bit tricky to answer, but let me start by asking the obvious question:

Do you have a folder called "elements" in which you placed the new file called "header.php" ?

If this is in place it seems to be a problem with your Wamp server, which can be even more tricky.

So please check the folder and the file at first and get back in touch.

/Carsten
grfirst replied on at Permalink Reply
Hi sabumnimdk,

Yes I have the folder "elements" in the theme directory, and files header.php & footer.php are included.

I also like to add that there's other concrete5 installs on this same WAMP server, where I've converted templates, and they're all working fine.

Only difference is those were done using concrete5 version 5.5.
grfirst replied on at Permalink Reply
Well now I've gone and did it, I'm really confused now.

I've installed a new site using concrete5 v.5.5 on the same WAMP server.

Used the same exact template, and placed the chopped up header/footer in the elements folder, leaving only the content php code, and the inlcude syntax in default.php.

This site works fine, as all the rest of the sites on this server using concrete5 v.5.5.

So is this a bug in 5.6 I'm wondering?
andrew replied on at Permalink Best Answer Reply
andrew
Try going into Dashboard > Sitewide Settings > Cache and turning your override cache OFF if it's on.

In 5.6 we added an override cache so we're not constantly checking if new files exist. This helps for performance but you have to have it off when you're actively developing new themes.
grfirst replied on at Permalink Reply
thanks andrew, that did it.
annar replied on at Permalink Reply
I wish I had come across this piece of info about 2 hours ago- thank you!! Solved all my override problems
dbaggs replied on at Permalink Reply
dbaggs
+1 from me too. I was caught out by this too. Thanks for the note Andrew.
dokido replied on at Permalink Reply
Thanks!
ballgood replied on at Permalink Reply
i clear the cache and changed the setting for the cache but i still get this text on my page.


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
mhawke replied on at Permalink Reply
mhawke
Have you put in a support request with Forigo?

http://www.concrete5.org/marketplace/themes/lucid/...
ballgood replied on at Permalink Reply 1 Attachment
i am not going to use the theme for a real website just trying to learn about C5. My boss gave me the theme off his computer i just trying to use it. But when i installed it i got all that on the web site. i will attach a screen shot of my theme page to show how it looks like it didn't install right.
grfirst replied on at Permalink Reply
I'd just like to chime in here if I could. When I had this issue it was due to the fact I had just upgraded from version 5.5 to version 5.6.

Not sure which version of concrete5 you're using, but I assume it's the latest.

I also assume that your directory is setup exactly as instructed (all files in appropriate folders, etc.) and all php code is exactly as it instructions specify.
mhawke replied on at Permalink Reply
mhawke
It doesn't look like the theme is installed in the correct place. Some of the paths look strange. Can you look in the folder located at "[root]/packages/lucid/themes/lucid/" and tell me what php files are in that folder?
cjramki replied on at Permalink Reply
cjramki
Thanks andrew...

It works for me also...