Theme referrences concrete directory when using includes
Permalink
Just like this bug in the old version when I try include a file, it thinks my theme is in the concrete directory...:
https://www.concrete5.org/community/forums/themes/single-page-inc-me...
When I use $view->inc I get a stupid error:
Of course a standard include works fine... Though I cannot fix it by changing theme like the other thread :|
Any ideas?
https://www.concrete5.org/community/forums/themes/single-page-inc-me...
When I use $view->inc I get a stupid error:
include(/Users/username/Documents/sites/sitename/public_html/concrete/themes/themename/includes/.head.php): failed to open stream: No such file or directory
Of course a standard include works fine... Though I cannot fix it by changing theme like the other thread :|
Any ideas?
bump
bump
Can you add:
before the include line and post the result here? It will give us better understanding what the View looks like when the inc() is called.
Looking at the code for View and Environment I'm *guessing* the pkgHandle for View isn't set, and that causes the Environment to seek the file from the core directories. I had a similar problem with external forms, which I had to fix by overriding the block controller (couldn't figure out any other way).
But let's see what you got first, ok?
before the include line and post the result here? It will give us better understanding what the View looks like when the inc() is called.
Looking at the code for View and Environment I'm *guessing* the pkgHandle for View isn't set, and that causes the Environment to seek the file from the core directories. I had a similar problem with external forms, which I had to fix by overriding the block controller (couldn't figure out any other way).
But let's see what you got first, ok?
Hey Juha,
Thanks for responding. How would I go about setting my pkgHandle? Seems to be set to false in the dump. Is it a theme thing or config thing?
Here is my mega dump on $view object:
Thanks for responding. How would I go about setting my pkgHandle? Seems to be set to false in the dump. Is it a theme thing or config thing?
Here is my mega dump on $view object:
// removed because dump was 95% of the page and wasn't useful either.
Thanks. After taking a better look it seems like this isn't similar to my case, after all. I have to check a few things but I'll get back to you soon. In the meantime, can you please tell me in which file are you calling the $view->inc() and where said file is located?
GOT IT. Includes can't be prefixed with a '.'
What the shite concrete.
What the shite concrete.
Ah, yes. Should have noticed that. Files whose name start with a dot are hidden files in Unix/Linux systems, and they are usually system files or configuration files that should be left alone. I think it makes sense to skip them.
Is there a specific reason you want the name of your include files start with a dot?
Is there a specific reason you want the name of your include files start with a dot?