Broken Image Paths

3 posts by 2 authors in: Forums > CMS Builder
Last Post: May 31, 2013   (RSS)

By csdesign - May 31, 2013 - edited: May 31, 2013

Hello!  I ran into an issue that I found a work around for... but really curious to know how to fix it correctly. 

I have a multiple record list of lodges.  On each lodge page there is a logo, photos, etc.  All the images are broken because they are trying to use only part of the image url. 

The code for the logo on the detail page was this:

<?php foreach ($lodge_pagesRecord['logo'] as $index => $upload): ?>
<img src="<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" alt="<?php echo htmlencode($upload['info3']) ?>" />
<?php endforeach ?>

Which resulted in broken images with the url of:   http://uploads/lodge-logos/absarokalogo_05a.gif

I modified it to this and it works, but I'd really like to know how to fix it correctly.

<?php foreach ($lodge_pagesRecord['logo'] as $index => $upload): ?>
<img src="http://www.mydomain.com/cmsAdmin/<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" alt="<?php echo htmlencode($upload['info3']) ?>" />
<?php endforeach ?>

I copied the header right from the code generator.

I've also set the Viewer Urls to: 
List Page URL: /lodges-east-yellowstone-list.php
Detail Page URL: /lodges-east-yellowstone-detail.php

Also, I'm using a slideshow that will only half work with my "work around"  (shows thumbnails but not large images) so I guess it's more of a priority than I thought.  :( 

I've attached a copy of the detail page. 

Any thoughts on why the path to the custom image directories are broken? 

Thanks! Tina

By csdesign - May 31, 2013

Hi Greg, 

I checked General Settings and "Upload Directory"  and Upload Folder URL settings are both:

uploads/

After a lot of errors... I finally changed the Upload Folder URL to: 

/cmsAdmin/uploads/

Yeah! It's working now! 

I'm not completely clear on the possible htaccess issue so I'm guessing maybe it's something I've been doing because this site seems to be the same as others that I've done and I haven't had issues with those. Or at least, not that I know of ! ;) 

Thanks, Tina