Single page inc method pulling from /concrete directory
Permalink
I have a single page that I'm overriding in my theme. The theme version of the file is able to include my header and footer just fine. Between the header and footer I'm trying to include a third php file from my theme's elements directory. Unfortunately the include fails because it is attempting to pull the file from the /concrete/themes directory.
More specifically, I have a single page at /single_pages/my_page.php. This is being overridden by the page of the same name in my theme here: /themes/my_theme/my_page.php. The override file calls
and
Both calls work as expected. Between the two, I have this call:
This results in the following warning:
Warning: include(/my/project/directory/concrete/themes/my_theme/elements/other/my_include.php) [function.include]: failed to open stream: No such file or directory in /my/project/directory/concrete/core/libraries/view.php on line 418
Does anyone have any idea why C5 would by trying to do this include from the /concrete directory? I've checked and double checked my include paths and everything matches up. I don't think it's a typo.
Thanks in advance!
More specifically, I have a single page at /single_pages/my_page.php. This is being overridden by the page of the same name in my theme here: /themes/my_theme/my_page.php. The override file calls
$this->inc('elements/header.php');
and
$this->inc('elements/footer.php');
Both calls work as expected. Between the two, I have this call:
$this->inc('elements/other/my_include.php');
This results in the following warning:
Warning: include(/my/project/directory/concrete/themes/my_theme/elements/other/my_include.php) [function.include]: failed to open stream: No such file or directory in /my/project/directory/concrete/core/libraries/view.php on line 418
Does anyone have any idea why C5 would by trying to do this include from the /concrete directory? I've checked and double checked my include paths and everything matches up. I don't think it's a typo.
Thanks in advance!
There was a bug in 5.6.0 that caused this to happen. I think it was fixed in 5.6.0.1 (and remains fixed in 5.6.0.2). If you're still on 5.6.0, you can disable the Overrides Cache via the dashboard to work around the issue.
Pretty sure I'm on 5.6.0.1. I'd have to double check, but I started the project at the beginning of the week and pulled down the latest stable build at that time. Maybe late last week. I'll check the version on Monday and repost.
Confirmed. Running 5.6.0.1.
Confirmed on 5.6.1.
To fix this, search for "Clear Cache" in the Intelligent Search bar or go to
and click "Clear Cache".
To fix this, search for "Clear Cache" in the Intelligent Search bar or go to
index.php/dashboard/system/optimization/clear_cache/
and click "Clear Cache".
I have the same problem, and I tested all the possible solutions proposed here but it doesn't work. :(
Warning: include(E:\Concrete5\apps\concrete5\htdocs\concrete/themes/darkness/elements/header.php): failed to open stream: No such file or directory in E:\Concrete5\apps\concrete5\htdocs\concrete\core\libraries\view.php on line 447
Warning: include(): Failed opening 'E:\Concrete5\apps\concrete5\htdocs\concrete/themes/darkness/elements/header.php' for inclusion (include_path='E:/Concrete5/apps/concrete5/htdocs/libraries/3rdparty;E:\Concrete5\apps
I'm not so sure if it's the version or something like that.
Any ideas?
Warning: include(E:\Concrete5\apps\concrete5\htdocs\concrete/themes/darkness/elements/header.php): failed to open stream: No such file or directory in E:\Concrete5\apps\concrete5\htdocs\concrete\core\libraries\view.php on line 447
Warning: include(): Failed opening 'E:\Concrete5\apps\concrete5\htdocs\concrete/themes/darkness/elements/header.php' for inclusion (include_path='E:/Concrete5/apps/concrete5/htdocs/libraries/3rdparty;E:\Concrete5\apps
I'm not so sure if it's the version or something like that.
Any ideas?
Go to /dashboard/system/ and try click "Clear cache"
Please use this
dont use ' but using ".
thank you
$this->inc("elements/nameFile.php")
dont use ' but using ".
thank you
Can you explain why this matters? I don't think it makes any difference which quite style you use.
> On Nov 20, 2013, at 8:54 AM, concrete5 Community <discussions@concretecms.com> wrote:
> On Nov 20, 2013, at 8:54 AM, concrete5 Community <discussions@concretecms.com> wrote:
Any know if this is a known bug? Not really sure how to cause it if it isn't.