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
<?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

sarah3585
 
Steevb replied on at Permalink Reply
Steevb
I use
<?=$this->getThemePath()?>


Might help?
sarah3585 replied on at Permalink Reply
sarah3585
Thanks for the reply. Unfortunately this makes no difference. Really odd as it was working fine before the upgrade.
NBardales replied on at Permalink Reply
NBardales
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.
cbenci replied on at Permalink Reply
Same problem here - it's adding in /concrete/ before the themes.
sarah3585 replied on at Permalink Reply
sarah3585
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...
perdittmann replied on at Permalink Reply
perdittmann
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/".
juliandale replied on at Permalink Reply
juliandale
Same problem for me, that the getThemePath() function is returning /concrete/ before the normal theme path.
sarah3585 replied on at Permalink Reply
sarah3585
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.
yoschi replied on at Permalink Reply
yoschi
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?
sarah3585 replied on at Permalink Reply
sarah3585
Sorry I'm a little late replying. I just had to hard code like so:
/themes/mytheme/filename.jpg


Not ideal, but the only way I could get my images displaying
sarah3585 replied on at Permalink Reply
sarah3585
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...
roketto replied on at Permalink Reply
roketto
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().
evolveinc replied on at Permalink Reply
The above was exactly my problem...no default.php
Deladroid replied on at Permalink Reply
Deladroid
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