getThemePath(); now including concrete directory since upgrade 5.6
Permalink 1 user found helpful
Hello, I've just upgraded to 5.6 and now my (hard coded) images in the theme aren't working. I'm using
Viewing in the source I can now see its now looking in concrete/themes/images for it. I have cleared the cache. Any ideas? Thanks
<?php echo $this->getThemePath(); ?>
Viewing in the source I can now see its now looking in concrete/themes/images for it. I have cleared the cache. Any ideas? Thanks
Thanks for the reply. Unfortunately this makes no difference. Really odd as it was working fine before the upgrade.
I'm using the same code as 55webdesign, and it works fine even after upgrading to C5.6 (which I recently did). No idea what the problem might be.
Same problem here - it's adding in /concrete/ before the themes.
A bug has been posted. Please plus it if you are getting it too.
http://www.concrete5.org/developers/bugs/5-6-0/this-getthemepath-is...
http://www.concrete5.org/developers/bugs/5-6-0/this-getthemepath-is...
That bug report you linked to seems to deal with only an extra "/" added, and marks this as resolved – but the issue here (I have the same problem) seems to be a stray "/concrete/".
Same problem for me, that the getThemePath() function is returning /concrete/ before the normal theme path.
I never got around the problem, just had to hard code the path instead.
Has anyone submitted a new bug? If not I can add one.
Has anyone submitted a new bug? If not I can add one.
Feel free to add it, I'm having the problem too.
All already present $this->inc() work, but any $this->inc() I add after activating the theme have the added /concrete before the /theme/mytheme directory.
Might I ask how you hardcoded it?
All already present $this->inc() work, but any $this->inc() I add after activating the theme have the added /concrete before the /theme/mytheme directory.
Might I ask how you hardcoded it?
Sorry I'm a little late replying. I just had to hard code like so:
Not ideal, but the only way I could get my images displaying
/themes/mytheme/filename.jpg
Not ideal, but the only way I could get my images displaying
I've added a bug, please plus it and add your comments if you are experiencing this issue.
http://www.concrete5.org/index.php?cID=413099...
http://www.concrete5.org/index.php?cID=413099...
Thanks to Rushing for posting the solution (in my case):
---
Unfortunately I'm on 5.6.0.2 and still seeing this. It has happening on a page that has a different theme from the rest of the site.
*UPDATE*: This turned out to be that my theme didn't have a default.php in it, so the themeDir/themePath was getting confused in View::setViewForTheme() when it called Environment::getRecord() which returned a valid record for the current page type (ie. /themes/mytheme/home.php), but couldn't find the default.php when calling Environment::getPath()/getURL().
---
Unfortunately I'm on 5.6.0.2 and still seeing this. It has happening on a page that has a different theme from the rest of the site.
*UPDATE*: This turned out to be that my theme didn't have a default.php in it, so the themeDir/themePath was getting confused in View::setViewForTheme() when it called Environment::getRecord() which returned a valid record for the current page type (ie. /themes/mytheme/home.php), but couldn't find the default.php when calling Environment::getPath()/getURL().
The above was exactly my problem...no default.php
I'm experiencing this on 5.6.3.3 and I do have a default.php. It's looking in root-/concrete/-themedirectory.
May, I'm simply just trying to move to a better instance on amazon from GoDaddy, and it has been H E double Hockey Sticks.
Jason
May, I'm simply just trying to move to a better instance on amazon from GoDaddy, and it has been H E double Hockey Sticks.
Jason
Might help?