LinkGraphic putting a backslash--need forwardslash

General ShopSite user discussion

LinkGraphic putting a backslash--need forwardslash

Postby dnrbookstore » Tue Aug 24, 2010 9:53 am

I think I've narrowed down to where the issue is, but I'm not for sure. I have some missing images. I created a section for the different categories — a 'shop by category' section if you will. It shows an image for the category over the name of the category. This uses the [-- LinkGraphic --] code to get the image for that category. If you look at the output it is places a \ when a / is required... I can't figure out where to change this. The site is www.mapstore.utah.gov.

Thanks in advance for you help!
dnrbookstore
 
Posts: 11
Joined: Mon Apr 05, 2010 3:03 pm
Location: utah

Re: LinkGraphic putting a backslash--need forwardslash

Postby Jim » Tue Aug 24, 2010 10:03 am

What is a link to the page that is having the issue?
What do you have set for the link graphic, is it just an image in the main media folder or an image in a sub directory?
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: LinkGraphic putting a backslash--need forwardslash

Postby dnrbookstore » Tue Aug 24, 2010 10:05 am

Here is one example -- http://www.mapstore.utah.gov/geologicpublications.html

Its an image in a sub folder.

The images worked fine when we had the site on a windows server. It has now been moved to a linux server and they don't show up. If that helps...
dnrbookstore
 
Posts: 11
Joined: Mon Apr 05, 2010 3:03 pm
Location: utah

Re: LinkGraphic putting a backslash--need forwardslash

Postby dnrbookstore » Tue Aug 24, 2010 10:11 am

I'm viewing them in Firefox
dnrbookstore
 
Posts: 11
Joined: Mon Apr 05, 2010 3:03 pm
Location: utah

Re: LinkGraphic putting a backslash--need forwardslash

Postby Jim » Tue Aug 24, 2010 10:21 am

When I go to that url I see images (2 rows of 5, 1 row of 2, and then 5 products with add to cart buttons below them. When I add a product, Small mines in Utah 2008, to the cart and view the cart source I see
<!-- ShopSite Pro 10 r7 for Microsoft Windows 2003 -->
So this is still on Windows not on linux.

Are you accessing a dev site on linux that isn't yet mapped to the mapstore.utah.gov domain?

If you are on linux and seeing backslashes they are more than likely coded into your data somewhere since Windows uses backslashes but linux doesn't. The Windows version of ShopSite does some conversion on urls to convert backslashes to forward ones but that wouldn't be done on Linux since it always uses forward slashes.

I'm using firefox too but that probably doesn't affect the issue.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: LinkGraphic putting a backslash--need forwardslash

Postby dnrbookstore » Tue Aug 24, 2010 10:28 am

Ah yes you're right that is true. I'm on the development site.

Try this -- http://68.69.168.234/

Here is the sst for the site--
[--DEFINE LINK_TO_PAGE--]
<td class="categories" align="center"><span><a style="text-decoration:none;" href="[-- PAGE.FileName --]">
[-- IF PAGE.LinkGraphic --]
[-- PAGE.LinkGraphic --]</span><br />
[-- IF PAGE.LinkName --]
<span style="font-weight:bold; text-decoration:none;"> [-- PAGE.LinkName --]</span>
[-- END_IF --]
[-- ELSE --]
[-- IF PAGE.LinkGraphic --]
[-- PAGE.LinkGraphic --]
[-- ELSE --]
[-- PAGE.Name --]
[-- END_IF --]
[-- END_IF --]
[-- IF PAGE.LinkText --]
[-- PAGE.LinkText --]
[-- END_IF --]
</a></td>
[-- VAR.Count INC --]
[--END_DEFINE LINK_TO_PAGE--]

[-- DEFINE PAGE --]
[-- VAR.TextColor PAGE.TextColor --]
[-- VAR.BackgroundColor PAGE.BackgroundColor --]
[-- VAR.LinkColor PAGE.LinkColor --]
[-- VAR.VisitedLinkColor PAGE.VisitedLinkColor --]
[-- VAR.ActiveLinkColor PAGE.ActiveLinkColor --]
[-- VAR.BackgroundImage PAGE.BackgroundImage --]
[-- INCLUDE Modern-Colors.sst PROCESS --]
[-- INCLUDE Page-Layout PROCESS --]
[-- VAR.SearchProductField PAGE.SearchProductField --]
[-- VAR.MoreInfoTemplate dnr-MoreInfoPage.sst --]
[-- VAR.FileName PAGE.FileName --]
[-- IF PAGE.DisplayColumnBorders --]
[-- VAR.border 1 --]
[-- ELSE --]
[-- VAR.border 0 --]
[-- END_IF --]
[-- VAR.TFLink PAGE.Name --]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>
[-- IF PAGE.Title --]
[-- PAGE.Title --]
[-- ELSE --]
[-- PAGE.Name REMOVE_HTML --]
[-- END_IF --]
</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META NAME="Description" CONTENT="[-- PAGE.MetaDescription --]">
<META NAME="Keywords" CONTENT="[-- PAGE.MetaKeywords --]">
<link rel="shortcut icon" href="http://www.mapstore.utah.gov/favicon.ico">
<link rel="icon" href="favicon.ico" type="image/x-icon" />
[-- INCLUDE dnr.css PROCESS --]
[-- INCLUDE mlddmenu.css PROCESS --]
[-- INCLUDE checkChecker.js --]
[-- INCLUDE prototype.js --]
[-- INCLUDE bookmarkpage.js --]
[-- INCLUDE mlddmenu.js --]

[-- INCLUDE dnr_ie.css PROCESS --]

<script type="text/javascript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<script type="text/javascript">
mlddminit();
</script>
</head>
<body onload="MM_preloadImages('http://www.mapstore.utah.gov/images/en-US/dnrimages/dnrimages/shoppingcart_over.gif','http://www.mapstore.utah.gov/images/en-US/dnrimages/checkout_over.gif')">

<div id="entire">

<div id="bodywrapper">
[-- INCLUDE dnr-header.sst PROCESS --]
[-- INCLUDE dnr-navigation.sst PROCESS --]
<div style="background-color:#D9602E; width:100%; height:10px;"></div>
<!--(Content) -->

<!--main content -->
<div id="contentwrapper">
<div id="contentcolumn">

<!-- Place for featured video
<div id="featuredvideo">
</div> -->

<div class="innertube">
[-- IF PAGE.DisplayName --]
<h1 class="name">[-- PAGE.Name --]</h1>
[-- END_IF --]



[-- IF PAGE.Text2 --]
<br />
<div style="border:1px solid #cccccc; padding:5px;"><!--category box -->
<div id="text1" style="padding:2px 0px 20px 5px">[-- PAGE.Text2 --]</div>
[-- IF PAGE.NumLinks 0 --]
# skip this section
[-- ELSE --]
<div id="linkspage">
[-- VAR.Count 0 --]
<table class="categories" cellpadding="8">
<tr valign="top" style="padding:8px;">


[-- LOOP LINKS --]
[-- IF VAR.Count 5 --]
</tr><tr valign="top" style="padding:8px;">
[-- VAR.Count 0 --]
[-- END_IF --]
<li class="inline">[-- LINK --]</li>
[-- END_LOOP LINKS --]</tr>
</table>
</div><!-- end links -->
[-- END_IF --]
</div>

[-- ELSE --]
[-- IF PAGE.NumLinks 0 --]
# skip this section
[-- ELSE --]
<div style="border:1px solid #cccccc; padding:5px;"><!--category box -->
<div id="linkspage">
[-- VAR.Count 0 --]
<table class="categories" cellpadding="8">
<tr valign="top" style="padding:8px;">


[-- LOOP LINKS --]
[-- IF VAR.Count 5 --]
</tr><tr valign="top" style="padding:8px;">
[-- VAR.Count 0 --]
[-- END_IF --]
<li class="inline">[-- LINK --]</li>
[-- END_LOOP LINKS --]</tr>
</table>
</div><!-- end links -->
</div>
[-- END_IF --]

<br />
[-- END_IF --]



[-- IF PAGE.Text1 --]
<div id="text1">[-- PAGE.Text1 --]</div>
[-- END_IF --]

[-- IF PAGE.NumProducts 0 --]
# skip this section
[-- ELSE --]
<div class="products">
<table class="products" width="100%" align="center" border="[-- VAR.border --]" cellpadding="8">
[-- LOOP PRODUCTS PAGE.Columns --]
<td cellpadding ="8" valign="top" align="[-- VAR.align --]">[-- PRODUCT --]</td>
[-- END_LOOP PRODUCTS --]
</table>
</div>
[-- END_IF --]

<div>
<!-- Multi-Page Links -->
[-- IF PAGE.ProductsPerPage "0" --]
# do nothing
[-- ELSE --]
<div align="center">[-- PREVNEXT --]</div>
[-- END_IF --]
</div>

</div>
</div>
</div><!--end main content-->

<!--left nav-->
[-- INCLUDE dnr-leftnav.sst PROCESS --]
<!-- end leftnav -->

</div><!-end body wrapper-->

<div id="footer">
[-- IF PAGE.DisplayPageFooter --]
[-- FOOTER --]
[-- END_IF --]
</div><!-- end footer -->
</div><!-- end entire -->
</body>

</html>
[-- END_DEFINE PAGE --]
dnrbookstore
 
Posts: 11
Joined: Mon Apr 05, 2010 3:03 pm
Location: utah

Re: LinkGraphic putting a backslash--need forwardslash

Postby Jim » Tue Aug 24, 2010 11:01 am

I still see image when I look at http://68.69.168.234/geologicpublications.html although they do have black borders around them. When I view the source I see
<img src="http://www.mapstore.utah.gov/media/categories\economicgeology.jpg" with the "categories\..."

I'm pretty sure this is coming from your page data. In the backoffice of your store go to Pages > Select the page that has Economic Geology as the name or economic.html as the filename. Then look at the Link Graphic: field and you will probably see categories\economicgeology.jpg. Since your data came from a Windows store that is how the path to images was defined since Windows uses the \ for paths instead of the /. To fix the issue you will need to fix all of the paths to images so they contain the / and not the \. I'm not sure if just saving changes on that page will fix it or if you will have to manually edit the field. (In my linux store I edited an image location and used a \ and when I saved it it went to / so you might be able to do it by just saving changes.) Try it on one page and see what happens. If it changes the \ to / then since you have a Pro level store the easiest way to change all the images would be to use Power edit, select all pages, select just the image (Graphic, Link Graphic) fields (make sure you leave the radio button set to Individual and not global), Click Proceed and Save changes. Then check a few to make sure they got changed and publish the store.
You may want to backup your data before doing the Power Edit just in case something doesn't work right.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: LinkGraphic putting a backslash--need forwardslash

Postby dnrbookstore » Tue Aug 24, 2010 2:24 pm

Perfect thanks Jim!
dnrbookstore
 
Posts: 11
Joined: Mon Apr 05, 2010 3:03 pm
Location: utah


Return to User Forum

Who is online

Users browsing this forum: No registered users and 35 guests

cron