I have made a mistake and images are pointing at the wrong url

Started by angusmcr, December 09, 2016, 13:46:29 PM

Previous topic - Next topic

angusmcr

i have images in my product pages that are pointing at the wrong url i made some change now im lost and don't know why this is happening, the annoying thing is i solved this before and cant remember how
wrong = https://www.fourseasonsgardenfurniture.co.uk/cast-aluminium-garden-furniture-product-ranges/images/new/chairs/chair4.jpg
right  = https://www.fourseasonsgardenfurniture.co.uk/images/new/chairs/chair4.jpg

any one got any ideas what setting i have wrong

Also the product pages links in category pages are pointing at the no sef versions
https://www.fourseasonsgardenfurniture.co.uk/cast-aluminium-garden-furniture-product-ranges/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=8&virtuemart_category_id=2&Itemid=501
but if i go to https://www.fourseasonsgardenfurniture.co.uk/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=8&virtuemart_category_id=2&Itemid=501 this solves the image issue

but the page should point to
https://www.fourseasonsgardenfurniture.co.uk/10-seater-sets/blenheim-oval-patio-set-detail which is working fine

so the injection of the top level Vm category is breaking all the links what have i done wrong? any ideas



Ghost

How are you adding these images? If manually with an editor, what links do you have in the editor?

angusmcr

HTML link is
/images/new/chairs/chair4.jpg
is being translated to
https://www.fourseasonsgardenfurniture.co.uk/cast-aluminium-garden-furniture-product-ranges/images/new/chairs/chair4.jpg

it is this injection of the top level category in to the url that is breaking every thing

https://www.fourseasonsgardenfurniture.co.uk/images/new/chairs/chair4.jpg works fine

the html in the page is
<td style="width: 25%;">
<a class="jcepopup" href="images/new/chairs/chair4.jpg" target="_blank">
<img class="jcepopup" src="images/new/chairs/chair4.jpg" alt="chair4" width="100%" height="NaN">
</a>
</td>

And it works if i change to

<td style="width: 25%;">
<a class="jcepopup" href="https://www.fourseasonsgardenfurniture.co.uk/images/new/chairs/chair4.jpg" target="_blank">
<img class="jcepopup" src="https://www.fourseasonsgardenfurniture.co.uk/images/new/chairs/chair4.jpg" alt="chair4" width="100%" height="NaN">
</a>
</td>

so it is seeing the base site name as https://www.fourseasonsgardenfurniture.co.uk/cast-aluminium-garden-furniture-product-ranges/ rather than https://www.fourseasonsgardenfurniture.co.uk/



Studio 42

If you want always that the image reffer to the website and not basedir do not use
images/new/chairs/chair4.jpg
but
/images/new/chairs/chair4.jpg

angusmcr

thank you for your  the reply but the images that have disappeared in some pages seems to be an issue with SEF as if i turn this off i have one working version off the page.

With the virtuemart sef enabled i get sef category page names but the product pages are still no sef urls.
Category = https://www.fourseasonsgardenfurniture.co.uk/10-seater-sets/

Product, via a direct link generated my Xmap plugin listing all of the pages https://www.fourseasonsgardenfurniture.co.uk/10-seater-sets/blenheim-a-large-oval-table-with-optional-lazy-susan is the correct page url.
but if i navigate to the same page via the category product link I am sent to
https://www.fourseasonsgardenfurniture.co.uk/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=3&virtuemart_category_id=2&Itemid=859.

I t has always worked fine in the passed but is now not showing sef url in the categories.

Has any one got an idea why the categories link to the long url when the correct url is available for the same page. why is it not using the sef url like it was before.

Should there be a /index.php in the url
as https://www.fourseasonsgardenfurniture.co.uk/?option=com_virtuemart&view=productdetails&virtuemart_product_id=3&virtuemart_category_id=2&Itemid=859.

Any ideas would be greatly appreciated



   

Studio 42

Or you have a cache problem, so try to clear joomla cache or your template do not use SEF links(i really doubt about this problem)
If you are in your product, the previous/next products link are sef and back to category too, so i don't think that this come from Virtuemart.

angusmcr

thank you for your help but i have decided to roll all the latest changes back to a good build and start again