Jump to content

Disappearing header images


Frank Auffret

Recommended Posts

There's seems to be an odd database issue on one of my development stores (and when tested on live site). I created a new skin based on Foundation and placed a banner image in the header of /templates/main.php. 

All works except for several (not all) product pages where the banner image fails as the relative path to the top banner image is changed e.g.
Working product page: http://dev.SITE.co.uk/skins/skin-2021/images/slides/top-banner-1.jpg
Corrupt product page: http://dev.SITE.co.uk/shower-doors/trays/walls/mixers/skins/skin-2021/images/slides/top-banner-1.jpg

I cannot see anything in the inventory table that would cause the image path to be changed. Looking in the table in phpMyAdmin the record looks okay no corrupt characters in any cell. Even deleting the data in phpMyAdmin and then re-entering it causes the same error.

If I delete the product record in CC Admin and re-add it in a new record with the same data the page works and the header image is displayed.

This is quite an old site but has been regularly upgraded (manually) to the latest CC version.

Any ideas?

Link to comment
Share on other sites

1 minute ago, Noodleman said:

there was a bug in an earlier foundation theme for this issue. if you're using a modified version of Foundation it probably didn't get the fix. 

thinking of this, might be related:

https://github.com/cubecart/v6/issues/2184

Thank you for your quick response. The actual product images work fine it's just the top banner image in the template that fails on just some product pages. I used the Foundation skin from the latest version of Cubecart so should be bug free

Link to comment
Share on other sites

Please show us the HTML surrounding where you are adding this image.

In constructing the URL for the image, you have the choice of:

{$ROOT_PATH} = /   (followed by skins/skin-2021/images/slides/top-banner-1.jpg)
<img src="{$ROOT_PATH}skins/skin-2021/images/slides/top-banner-1.jpg">

Alternate:
<img src="{$ROOT_PATH}skins/{$SKIN_FOLDER}/images/slides/top-banner-1.jpg">

Or,

{$STORE_URL} = http://dev.SITE.co.uk  (followed by /skins/skin-2021/images/slides/top-banner-1.jpg)

Do NOT use {$VAL_SELF}

 

Link to comment
Share on other sites

22 hours ago, bsmither said:

Please show us the HTML surrounding where you are adding this image.

In constructing the URL for the image, you have the choice of:


{$ROOT_PATH} = /   (followed by skins/skin-2021/images/slides/top-banner-1.jpg)
<img src="{$ROOT_PATH}skins/skin-2021/images/slides/top-banner-1.jpg">

Alternate:
<img src="{$ROOT_PATH}skins/{$SKIN_FOLDER}/images/slides/top-banner-1.jpg">

Or,

{$STORE_URL} = http://dev.SITE.co.uk  (followed by /skins/skin-2021/images/slides/top-banner-1.jpg)

Do NOT use {$VAL_SELF}

 

Thanks here's HTML

           <div class="row hide" id="small-search">
               <div class="small-12 columns">
                  {include file='templates/box.search.php'}
               </div>
            </div>            
            <!-- custom header-->
            <div class="row">
             <!--Banner-->
                <div class="medium-12 large-12 small-12 columns">
                  <img src="skins/skin-2021/images/slides/top-banner-1.jpg" title="Wesley Marine Windows" />
                </div>                
            </div>        
        <!-- ends custom header-->
            <div class="row small-collapse">
               <div class="small-12 columns">
                  {include file='templates/box.navigation.php'}

 

Yes thanks it can also be fixed with

{$ROOT_PATH} = /   (followed by skins/skin-2021/images/slides/top-banner-1.jpg)

but that feels like a sticking plaster over a problem with the inventory table

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...