Include Error on Windows 7/ Apache 2.2/ php5.4.12/ Concrete5.6.1

Permalink
Hi

I'm a newbie to Concrete5, but have a development background. Sadly not php though. I'm looking to use Concrete5 as a CMS editing tool for a new client of mine. I'm using my windows machine as a dev box. It's likely I will be deploying to *nix. Anyway, I've created a theme called upbeat and can create GlobalAreas and Areas without issue.

However, I'm now wanting to progress to breaking up templates into common elements. I've hit a hurdle at the first fence, and it looks like it might possibly be a Windows deployment bug, or a config error on my part.

I've created elements/header.php under my theme directory. I've gone to use
<? $this->inc('elements/header.php');?>
at the top of my default page, but when I load a page using the default template, I get the following error (there's quite a few of them, but this one will give you the gist):

Warning: include(C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\concrete5.6.1\concrete/themes/upbeat/elements/header.php)failed to open stream: Invalid argument in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\concrete5.6.1\concrete\core\libraries\view.php on line 449

As you can see, Concrete seems to be getting it's slashes in a muddle. It starts out with \ slashes and ends, from the concrete folder on, with / slashes. Additionally, it seems to be looking in concrete5.6.1/concrete/themes. My theme is in concrete5.6.1/themes.

If anyone can help, I would truly appreciate it.

All the best,
DarbsDev

webdewd
 
JohntheFish replied on at Permalink Best Answer Reply
JohntheFish
Don't worry about the nix vs windows slash directions. Apache takes care of that for you. Lots of us develop on windows and ship to nix.

When looking for a theme, concrete starts looking in the core, then looks in a few other places. If it still doesn't find anything and the whole lot breaks, the error message is usually reports the first or last place it started looking (and not where you wanted somewhere in the middle).

So the chances are you have something slightly wrong in the path and, having failed to find it, c5 started looking elsewhere and gave up.

There is a great howto on themes by 12345J and Jordanlev
http://www.concrete5.org/documentation/how-tos/designers/making-a-t...

You may also find these useful

http://www.concrete5.org/documentation/how-tos/developers/change-th...
http://www.concrete5.org/documentation/how-tos/designers/common-the...
http://www.concrete5.org/documentation/how-tos/designers/modify-a-p...

Finally, Remo's theme book:
http://www.concrete5.org/about/blog/concrete5-sightings/new-book-cr...
webdewd replied on at Permalink Reply
webdewd
Mmmm, I messed with the db when I shouldn't have. I deleted a pagetype which wasn't being used from the pagetypes table. It wouldn't delete from the front end. Seems it caused problems in the core.

I reinstalled concrete5, and the include function now works. Apologies. Thx for the tutorial links.

This website stores cookies on your computer. These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media. To find out more about the cookies we use, see our Privacy Policy.