Images Not Appearing

Permalink
Images appear fine on my main page (default)... and will appear on the edit page, although some will only appear with absolute paths and some work with the get theme path...

BUT no matter what I do, images placed into global areas are not appearing on sub pages...

Any ideas, I'm kind of at my wits end.

thanks

 
DAkers replied on at Permalink Reply
Could you give an example of a image tag that is not working?
wkm replied on at Permalink Reply
I have tried both of these;
<div class="logo">
<a href="http://www.adirapartments.com"><img src="http://www.adirapartments.com/themes/adira/img/logo.png" alt="" /></a></div>

AND

<div class="logo">
<a href="http://www.adirapartments.com"><img src="<?php echo $this->getThemePath(); ?>/img/logo.png"/></a></div>


like I said BOTH of these work on the main page, and in the edit page, but on subsequent pages I add into the system the image is NOT appearing.

Also, I've already tried deleting the block/stack containing this code and then rebuilding it... same issue.
jvansanten replied on at Permalink Reply
When an image is used in a theme -- header or footer -- I simply locate it in the img subfolder of the theme and reference it with the getThemePath function. I've not located that in the global stack -- I guess I haven't had a need to make that more widely available.
wkm replied on at Permalink Reply
regardless, the images are not appearing... and my code is correct so I don't know whats going on.
jvansanten replied on at Permalink Reply
Are they still in the global stack -- should be unnecessary if they're only in your theme? Why not try removing them and see if that works.
mhawke replied on at Permalink Reply
mhawke
Here's a thought... Are you sure your sub-pages are actually using the Page Type file that contains the Global Area? I have had situations where I thought I had added the proper Page Type file but C5 was using default.php instead because my Page Type wasn't actually installed and active. Add some hard-coded text to your default.php and if that text appears on your sub-pages, you will know C5 is actually using default.php.
Dantourin replied on at Permalink Reply
Dantourin
I just recently had the same problem, however, I had the benefit of having a site where this was functioning.

The following code was not working:

<h1 id="logo">
  <a href="<?php echo DIR_REL?>/">
    <IMG src="themes/dark_chocolate_custom/images/logo.jpg" alt="" height="256" width="256"/>
  </a>
</h1>


Thanks to the comment about relative paths...upon looking again, I realized that I was missing a slash.

The following code works:

<h1 id="logo">
  <a href="<?php echo DIR_REL?>/">
    <IMG src="/themes/dark_chocolate_custom/images/logo.jpg" alt="" height="256" width="256"/>
  </a>
</h1>
SheldonB replied on at Permalink Reply
SheldonB
this could be open a box of worms but this might be happening

http://www.concrete5.org/community/forums/customizing_c5/path-updat...

alternatively if you are hardcoding your php you can just src="/themes/yourtheme/img/xxx.gif"

alternatively

if it is an editable global area you can upload your logos to the file manage and call it from there so even when you change your theme down the road it will still be in the header global area.

I just had an issue with updating a theme where I updated my default.php but forgot to update my view.php the new paths ..

-Just some thoughts I hope it helps-
mhawke replied on at Permalink Reply
mhawke
I had a look at your site and it appears that you are adding php code to an HTML block. This will not work because php code is server-side and the HTML block renders only in the browser. The solution is to add an image block and pick the logo image from the File Manager.

There is php code is showing up in the HTML source in the browser:
<div class="logo">
  <div id="HTMLBlock84" class="HTMLBlock">
    <div class="logo">
      <a href="<?php echo $this->getThemePath()?>">
      <img src="img/logo.png" alt=""></a>
    </div>
  </div>
</div>
wkm replied on at Permalink Reply
thanks for the replies.
I thought you were suppose to use the get theme path in all html locations, and with that code the image IS appearing on some pages, but not all - In any case, as I said in the beginning, if I HARD CODE The direct image path (eliminating the PHP) , the image is still NOT showing up.
I have to double check the code, but I believe the individual property pages off the main page, show this problem - unfortunately, I haven't been able to get onto the site yet because I keep getting the internal 500 server error. If I wait about 20 minutes, the site should be available at least for a couple of minutes.
wkm replied on at Permalink Reply
I just checked the global site logo stack and this was the current code;
<div class="logo">
<a href="http://www.adirapartments.com"><img src="http://www.adirapartments.com/themes/adira/img/logo.png" alt="" /></a>
</div>

so that php get them isn't even currently in there.
mhawke replied on at Permalink Reply
mhawke
That's not what's showing up in the HTML at my end. You might have done this already but make sure all C5 caching is off. 'Dashboard->System and Settings->Cache and Speed Settings'.
wkm replied on at Permalink Reply
yeah Cache is already off.
I just checked the code, and its a direct url, no php.
mhawke replied on at Permalink Reply
mhawke
Could you post the Page Type file that is being used for these pages? I'm wondering if the Global Area is being properly added to the PHP of that page.

You will need to rename it to a .txt file to post in the forum.
wkm replied on at Permalink Reply 1 Attachment
here is the page type code where the Site logo is not showing up.
mhawke replied on at Permalink Reply
mhawke
Clean as a whistle.

Could you try adding an Image Block to that Global Area instead of an HTML Block and then grab the image from the File Manager?

You also need to find out why your server is so slow. I couldn't work on a site that slow. I'd forget what I was doing while I waited for the page to refresh ;-)
wkm replied on at Permalink Reply
OMG! you have no idea, it's on a Godaddy server and it's been killing me. I've been trying to resolve that issue and so far obviously nothing.
I'm getting ready to tell the client they need to move to somewhere that will be more suitable for concrete5 (even in a shared environment).
Unfortunately, for me, the move is going to mean a lot of extra work. :(

I'm sure I tried just using a straight image from the file manager, but I'll try again and see what happens.

thanks for the attention.
mhawke replied on at Permalink Reply
mhawke
You will be pulling your hair out with GoDaddy. Search these forums for GoDaddy and you'll see what I mean.
mhawke replied on at Permalink Reply
mhawke
The reason it's showing up on the main page and not the other pages is that the HTML that's being generated is producing a relative path and so when you're on the home page, the relative path picks up the image you have in

http://adirapartments.com/img/logo.png...

but when you navigate to a sub-page, there is no logo.png in

http://adirapartments.com/rental-listings/img/logo.png...

I would try to create an Image Block and be done with it.