VirtueMart Forum

VirtueMart 1.1.x [ Old version - no longer supported ] => Products, Prices, Tax and Categories VM 1.1 => Topic started by: jelly on April 01, 2010, 11:20:08 am

Title: product_full_image refers to http://localhost !?!
Post by: jelly on April 01, 2010, 11:20:08 am
On my online site the product_thumb_images are doing fine. But when clicking for a larger image, it refers for the product_full_image to http://localhost/ which is of course not right.

Does anybody know where I can change the URL for the full image?

I checked my flypage and browserpage and in the VM backend the configuration seems to mention the right URL's.

OBVIOUSLY I am overlooking something, but WHERE!?! :-\
I hope someone can help me!
Title: Re: product_full_image refers to http://localhost !?!
Post by: Forrest on April 03, 2010, 20:00:22 pm
The only thing I know of is your VM site URL setting, but that would make the whole VM not work. Otherwise, have you cleared your cache?
Title: Re: product_full_image refers to http://localhost !?!
Post by: jenkinhill on April 05, 2010, 11:05:42 am
Site issues with URLs including localhost are most often related to wrong settings in vrtuemart.cfg.php

Make sure that you enter the correct site urls for SITE and SECUREURL, eg:

define( 'URL', 'http://www.yoursite.com/' );
define( 'SECUREURL', 'http://www.yoursite.com/' );

and also make sure that paths, such as 'IMAGEPATH' are correct.

/administrator/components/com_virtuemart/virtuemart.cfg.php
Title: Re: product_full_image refers to http://localhost !?!
Post by: jelly on April 08, 2010, 14:25:07 pm
Thank you for your reactions.

Forrest, the rest of my VM is working correctly. And indeed, I cleared my cache. I have the faulty link to localhost on every computer I use: at home, at work...

Jenkinhill, thank you for your remarks. I checked administrator/components/com_virtuemart/virtuemart.cfg.php
but no strange things here.

// these path and url definitions here are based on the Joomla! Configuration
define( 'URL', 'http://www.mysite.nl/' );
define( 'SECUREURL', 'http://www.mysite.nl/' );
I did an ctrl F on 'image' so that I would see all defitions related to 'image' but also no localhost-referral to be found here.

So strange!

I hope you have some more ideas to check?


Title: Re: product_full_image refers to http://localhost !?!
Post by: PRO on April 08, 2010, 14:30:34 pm
Is this the default image,


OR Additional Images?
Title: Re: product_full_image refers to http://localhost !?!
Post by: jelly on April 08, 2010, 16:52:35 pm
Hi Banquet, thank you for your reaction.

It concerns the default image. Just the product_full_image, I have only 1 full image per product.

When I click on the thumbnail, it goes to: http://localhost/myownsite/index.php?option=com_virtuemart&Itemid=55&page=shop.product_details&flypage=flypage_images.tpl&product_id=223&category_id=3

Now that I paste this URL I see that 'myownsite' has no extension like .com or .nl is that normal?

However, in the VM backend: administration/configuration/security I see mysite with .nl
Site URL  http://www.mysitename.nl/
SECUREURL http://www.mysitename.nl/
also the file Jenkinhill /administrator/components/com_virtuemart/virtuemart.cfg.phpadviced me to check looks o.k.
Title: Re: product_full_image refers to http://localhost !?!
Post by: PRO on April 08, 2010, 17:14:53 pm
what do you have "Var live site" in your joomla config set to?

Title: Re: product_full_image refers to http://localhost !?!
Post by: jelly on April 12, 2010, 16:17:31 pm
My var $live_site = ''; is empty.

The only localhost's I encounter are for var $host and var $smtphost but I assume they are both for the database on the webserver, isnt it?

var $log_path = '/home/autoscha/domains/mysitename.nl/public_html/logs';
var $tmp_path = '/home/autoscha/domains/mysitename.nl/public_html/tmp';
var $live_site = '';
var $ftp_root = '/domains/mysitename.nl/public_html';
var $host = 'localhost';
var $smtphost = 'localhost';
Title: Re: product_full_image refers to http://localhost !?!
Post by: PRO on April 12, 2010, 18:38:15 pm
go into your database, and see if localhost is stored for the address
Title: Re: product_full_image refers to http://localhost !?!
Post by: jelly on April 13, 2010, 11:45:19 am
Hi Banquet,

in phpmyadmin in jos_vm_product the product_full_image refers to a normal jpg-file without directory specification so this looks ok.

I checked browse_2 and my flypage on the content, checked with ctrl F to see if the word localhost is used: Nowhere a referral to http://localhost/.

Yesterday I did an upgrade from VM 113 to 114 naively hoping it would change something, but no.

I must be overlooking it somewhere, but where  :o where  ??? where. ::)

It started when I had my old local xampp site open, and on another browsertab at the same time my online site open. I copied and pasted some texts etc (no php, just in normal backend). While working on the sites, I suddenly realised the online site was referring to my local xampp site for the images! But I can't fix it... I can't find out where it suddenly changed...
Title: Re: product_full_image refers to http://localhost !?!
Post by: PRO on April 13, 2010, 15:31:19 pm
post your URL
Title: Re: product_full_image refers to http://localhost !?!
Post by: Forrest on April 13, 2010, 19:07:30 pm
Worse comes to worse, you can always to a backup of your site, including a database backup, and then Grep the entire backup folder for "localhost". That should find it
Title: Re: product_full_image refers to http://localhost !?!
Post by: jelly on April 13, 2010, 19:53:34 pm
URL= deleted after having found the solution, did not want it to be found by google
Title: Re: product_full_image refers to http://localhost !?!
Post by: PRO on April 13, 2010, 21:20:58 pm
It started when I had my old local xampp site open, and on another browsertab at the same time my online site open. I copied and pasted some texts etc (no php, just in normal backend). While working on the sites, I suddenly realised the online site was referring to my local xampp site for the images! But I can't fix it... I can't find out where it suddenly changed...

this is whats weird, are you sure NO PHP?

take a whole version of 1.1.4 and overwrite the site
Title: Re: product_full_image refers to http://localhost !?!
Post by: Forrest on April 13, 2010, 21:46:31 pm
I would think it has to be php modification somewhere as well.

Either overwrite as BanquetTables.pro recommends or create a backup of it and Grep it for localhost.
Title: Re: product_full_image refers to http://localhost !?!
Post by: jelly on April 20, 2010, 14:37:13 pm
Thanks for your suggestions. I am already reflecting about it for a couple of days. Grep sounds very interesting, never done that before, I am going to explore this. First I will try to overwrite with a complete package. I will get back to you on this! For now, thanks again for the suggestions.
Title: Re: product_full_image refers to http://localhost !?!
Post by: richsung on April 20, 2010, 15:22:13 pm
I think the problem could be in one of two places:

1) The template file
2) The "Product URL" setting that's in the PRODUCT database

I don't think it's an image problem, because when you click on a product, the faulty URL is actually:

http://localhost/autoschadeshop/index.php?option=com_virtuemart&Itemid=55&page=shop.product_details&flypage=flypage_images.tpl&product_id=100&category_id=2

What's the difference between this URL and the product details URL (that it comes from)?

LINK flypage=flypage.tpl&product_id=237&category_id=1
ORIG flypage=flypage_images.tpl&product_id=100&category_id=2

So either the flypage is linking off to the wrong URL or the flypage is pulling the product URL entry in the product description and trying to go there. In all likelihood, whoever developed the site was using a local web server and all of this worked using localhost, but then when it was time to go live, forgot to change the links over.

--Rich
Title: Re: product_full_image refers to http://localhost !?!
Post by: jelly on April 21, 2010, 11:11:52 am
Hi Forrest and Banquet,

Hmmmm... I did a GREP (loved it! :-*) and searched on '/localhost', that narrowed it down to 6 files:

CHANGELOG.php
/administrator/cache/productexportfile.csv
/administrator/components/com_extplorer/config/.htusers.php
/libraries/bitfolge/feedcreator.php   
/libraries/openid/Auth/OpenID/Server.php
/libraries/tcpdf/config/tcpdf_config.php

I opened these files and compared it to online files from my other site (which has no problems) however there is also http://localhost/ mentioned!?!? Strange...

E.g. in tcpdf_config.php:
 
/**
    * url path (http://localhost/tcpdf/)
    */
   define ("K_PATH_URL", "http://localhost/_OPENSOURCE/tcpdf/");


I threw away the .csv file in which indeed localhost was mentioned for the full_image (also strange since checking phpmyadmin I did not see localhost mentioned...). Can I throw away everything in the dir /administrator/cache/?

I don't know what to ask you now. May be to do a check for some of the mentioned files to see if you also have localhost mentioned in them?

Thanks in advance for your very much appreciated reply.
Title: Re: product_full_image refers to http://localhost !?!
Post by: jelly on April 21, 2010, 11:51:12 am
I FOUND IT!!!!!

One of the first things I checked was my phpadmin, in the rows of product_full_image, buttt I did not look at the row product_url :o. There it said: http://localhost!!!!

I did a csv upload with 'http://localhost' replaced by 'http://mysiteurl' but then there suddenly was no option of 'view larger image'. Clicking on the thumbnail made you go to another product.

Then I just emptied/deleted the complete column-contents of product_url. Uploaded again and voila: I had a button 'view larger image' again and... my larger images came in view. WHAT A BEAUTIFUL SIGHT! ;D

Thank you all for thinking with me and for trying to find the answer. The GREP results and the text of Rich "pulling the product URL entry in the product" pointed me again into the direction to take a look at the csv file! THANX!

Title: Re: product_full_image refers to http://localhost !?!
Post by: Forrest on April 22, 2010, 04:32:26 am
NP... for future reference... you can do an export of your complete database, and also put that in your site backup folder. This way when you do a GREP... you are not only grepping your site files... but also your database backup! This way you cannot lose... you're checking everything!

I use a complete package I have developed over the years for many of my e-comm sites. So when I go to create a new site from the "complete package" I just have to do a search for the domain & business name and replace it with the current clients domain / business name. A few config tweaks, and new products, and the site is up and running. Grep is great.