VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product creation => Topic started by: Shimon Hirschhorn on May 23, 2016, 11:30:00 AM

Title: Thumbnails - (Default URL)
Post by: Shimon Hirschhorn on May 23, 2016, 11:30:00 AM
Hi,

I am having difficulties getting thumbnails to appear for some products.  I have been rooting around to try and understand what is the difference between products that will display thumbnails and those that won't.

I have followed the connections within the database and the information seems to be there, but there are some differences in the way the backend show things

I have checked and the thumbnails do exist in the public_html/images/stories/virtuemart/product/resized directory for both items.

The jos_virtuemart_medias..file_url_thumb field is empty for the items without thumbnails and some of the items that do show thumbnails.

However in the backend the items that do show the thumbnails the path starts with "(Default URL)" (eg   (Default URL) images/stories/virtuemart/product/resized/OH-TX-1_90x90.jpg ) and the items that do not display the thumbnail lack this prefix (eg images/stories/virtuemart/product/resized/OH-TR-1_90x90.jpg ).

Does anyone understand what is going on here and how can I fix this ?

Thanks in advance for any hints
Title: Re: Thumbnails - (Default URL)
Post by: jenkinhill on May 23, 2016, 13:33:51 PM
Are you referring to product image thumb or additional image thumbs? The additional thumbs are generated on the fly when a product details page is viewed (takes microseconds, so does not affect page load speed). After that they appear in the backend.  I assume youi are using VM3.0.16?

file_url_thumbis not used now. http://forum.virtuemart.net/index.php?topic=132128.msg462937#msg462937
Title: Re: Thumbnails - (Default URL)
Post by: Shimon Hirschhorn on May 23, 2016, 14:01:20 PM
Kelvyn, Thanks for the reply. 

I am referring to the Product Thumbs.

I am using VM3.0.14.  When I click download on the VM site, that is the version that it downloads.
I assume that I should upgrade.    Where do I get 3.0.16?  Will it help with this ?

Title: Re: Thumbnails - (Default URL)
Post by: Ajeet Singh on May 23, 2016, 14:15:38 PM
Hi,

Actually In some virtuemart version you can get the thumbnail image using parameter "file_url_thumb" but in some virtuemart version you should not get . So i suggest you to find the parameter "file_url" . From that parameter you will get the full path of that thumbnail image like "images/stories/virtuemart/product/resized/OH-TX-1.jpg" the re-size that image using js or css according to your code line.

Thank You,

Ajeet Singh
Webkul Software pvt. Ltd.
Title: Re: Thumbnails - (Default URL)
Post by: jenkinhill on May 23, 2016, 15:03:22 PM
VM 3.0.16 is in http://dev.virtuemart.net/projects/virtuemart/files

In the backend yopu should see something like in the attached image -
Title: Re: Thumbnails - (Default URL)
Post by: Shimon Hirschhorn on May 23, 2016, 15:40:17 PM
That is what I see on the backend.

Except that on items that the thumbnail the (Default URL) is missing.  I  checked and the full sized image is in the images dir and the thumbnail is in the resized dir.

However the thumbnail does not appear on the site.


I went to the file repository and tried to download.  It wants me to login.  So I searched for register and registered to redmine.  I tried to login to download the file and its invalid.

( I really am not this big of a dunce)
Title: Re: Thumbnails - (Default URL)
Post by: jenkinhill on May 23, 2016, 15:57:43 PM
On one of the products without a displayed thumb try re-uploading the image on the product image tab, select Replace for the image action. Then see if the thumb appears.
Title: Re: Thumbnails - (Default URL)
Post by: Shimon Hirschhorn on May 23, 2016, 16:31:54 PM
Hitting replace once does not help.

I have looked at the jos_virtuemart_product_medias table and the entry is there. (32225,671,1) .  Hitting replace/save causes it to add an entry (0,671,1).

If I hit replace again I get a SQL error that the INSERT of (0,671,1) already exists.

I checked the jos_virtuemart_medias and media 671 is there with the correct file URL. ( no thumbnail URL, but you already told me that this is not used)
Title: Re: Thumbnails - (Default URL)
Post by: Shimon Hirschhorn on May 23, 2016, 20:47:26 PM
I upgraded to VM3.0.16  . (J!3.4.8)

The thumbnail issue is still there.  Other issues cropped up.

Any hints appreciated.
Title: Re: Thumbnails - (Default URL)
Post by: Jörgen on May 24, 2016, 10:17:46 AM
VM 3.0.16 should be used with Joomla 3.5.1. VM3.0.16 has been patched specially for Joomla 3.5.1.

regards

Jörgen @ Kreativ Fotografi
Title: Re: Thumbnails - (Default URL)
Post by: jenkinhill on May 24, 2016, 12:28:20 PM
Can you post the URL of a page with an image not showing?
Title: Re: Thumbnails - (Default URL)
Post by: Shimon Hirschhorn on May 24, 2016, 14:39:28 PM
Gladly !

http://www.proflixsales.com/products/converter/lynx-yellobrik-lc-single-optical-receiver-sfp-module-1260-1620nm

the sku is OH-RX-1-LC

In trying to find the problem I changed the image to  OHTR1.jpg
and the back end shows
images/stories/virtuemart/product/OHTR1.jpg     for the image and
(Default URL) images/stories/virtuemart/product/resized/OHTR1_90x90.jpg      for the thumb

When I search for the image via file manager the image is found. (see attached image)
But when I try and see the image via a browser I get a 404

Both images exist ?

BTW I have now upgraded from J3.4.8 to 3.5.1

So I am running J3.5.1  and VM3.0.16

Thanks for your help.
Title: Re: Thumbnails - (Default URL)
Post by: Shimon Hirschhorn on May 24, 2016, 15:32:13 PM
For some reason the image does not exist via the browser but it is there.
Title: Re: Thumbnails - (Default URL)
Post by: jenkinhill on May 24, 2016, 15:35:40 PM
Unfortunately that did not help except to show that it is the main image as well as the thumb that is not showing. How many actual image files do you have in the products and resized directories? Is there any difference in filename structure between images that show and those that don't?
Title: Re: Thumbnails - (Default URL)
Post by: Shimon Hirschhorn on May 24, 2016, 17:11:56 PM
I found out why the image was not showing from a browser.  The owner was ROOT.  I changed them all to user,user.

Then you can see the image via a browser.

I re-uploaded my CSVI product import.

So ......

http://www.proflixsales.com/products/converter/lynx-yellobrik-lc-single-optical-receiver-sfp-module-1260-1620nm
SKU = OH-RX-1-LC
Used URL = images/stories/virtuemart/product/OH-TR-1.jpg
Used thumb url = (Default URL) images/stories/virtuemart/product/resized/OH-TR-1_90x90.jpg

Deleted the Thumbnail.
VM recreated it.
Both the full sized and the thumb are visible from a browser.

virtuemart_product_id = 32225.
jos_virtuemart_product_medias has a record (92161,32225,21088,1)
jos_virtuemart_medias has a record (21088,......, images/stories/virtuemart/product/OH-TR-1.jpg )

other products with this image are not showing either.

There are about 21,000 images in products.



Title: Re: Thumbnails - (Default URL)
Post by: Shimon Hirschhorn on May 24, 2016, 21:10:21 PM
I have been trying different things to see if there is any system as to what is displayed or not.

I deleted OH-TR-1.jpg from product and the thumbnail from resized.
I copied an image that was being displayed for a different product and named it OH-TR-1.jpg

The thumbnail was created in resized.
VM does not display product image nor thumbnail.

This seems to "prove" that the image itself is not the problem
Title: Re: Thumbnails - (Default URL)
Post by: Shimon Hirschhorn on May 24, 2016, 22:02:27 PM
SOLVED  - sort of....

I found that in the jos_virtuemart_medias.published was = 0.

I set it to 1 and image appears.

So now I know the cause.  The question remains how does this happen and what has to be done so that it won't happen.

Is this user error ?  What did I screw up ?

To test this I deleted all products with this image.
I deleted the record for this image in the jos_virtuemart_medias table.
I deleted the thumbnail.

Then I ran an import from CSVI.
an appropriate record in the jos_virtuemart_medias was created but no images displayed.
I then edited this record and set "published" to 1.
Images display.

Title: Re: Thumbnails - (Default URL)
Post by: Shimon Hirschhorn on May 24, 2016, 22:45:51 PM
SOLVED !!!  Completely.

The problem stems from the file that I used to import the products.
The top of the excel file has current item.
The bottom of the file has some products that I have to deal with in the future, so as of now they are set to published - N.

Some of the products at the bottom (unpublished ) use the same images as the ones at the top.

When I import the products using CSVI, it first sets the product media to published for all the current products.  Then when it gets to the products on the bottom that are unpublished, it unpublishes  their media.

Thank you all for your help.
Title: Re: Thumbnails - (Default URL)
Post by: jenkinhill on May 25, 2016, 12:25:04 PM
OK so we put it down to user error.....
Title: Re: Thumbnails - (Default URL)
Post by: Shimon Hirschhorn on May 25, 2016, 18:16:49 PM
No ego here.

I am always ready to accept the blame.
I just want it to work in the end.

So my error is using the same image for more that one item, and having the unpublished one below the published one in my import.


Now I just have to get my VM backend to operate again.   The product filtering is funky.  Setting the vendor dropdown to "please select" used to return products from all vendors.  Now it returns products from NO vendors (no products)
Title: Re: Thumbnails - (Default URL)
Post by: Milbo on May 30, 2016, 11:16:52 AM
Quote from: Shimon Hirschhorn on May 25, 2016, 18:16:49 PM
So my error is using the same image for more that one item

Quote from: Shimon Hirschhorn on May 25, 2016, 18:16:49 PM
Now I just have to get my VM backend to operate again.   The product filtering is funky.  Setting the vendor dropdown to "please select" used to return products from all vendors.  Now it returns products from NO vendors (no products)
You must be superadmin or vendor manager
Title: Re: Thumbnails - (Default URL)
Post by: yannickperi on June 23, 2016, 18:17:40 PM
Hi all,
In my case, the thumbnail was not showing at all in module scroller.
My personal solution was to delete the text (default URL) in the field image in each product (boring !).

This text is inserted in administrator language file : en-GB.com_virtuemart_media.ini
- line : COM_VIRTUEMART_DEFAULT_URL="(Default URL) %1$s"
- replaced by : COM_VIRTUEMART_DEFAULT_URL="%1$s"

After remplacing text, everything is fine.
Hope it will help.