Hello,
I just upgraded to 1.1 and it's fantastic!!!
The only issue I have so far is that my images are not showing up
Take a look... http://tiketroom.com/index.php?page=shop.browse&category=&option=com_virtuemart&Itemid=1
If I click on it, I can see the full size images. The strange thing is that, in the backend, I can see the thumbnail so it
did produce the thumbnail but it simply does not show in the front end. I also created the thumbnail 90x90 and uploaded it
and that still didn't work.
PLEASE HELP!!!
Few things if you have 'Dynamic Thumbnail Resizing' enabled, disable it, it doesn't work (known bug) if you don't have 'Dynamic Thumbnail Resizing' enabled and images are not showing change file permission of show_image_in_imgtag.php to 777 or 755, it depends to your server configuration you might have to try different values to get it work, and make sure your resize folder has write permission again 777 or 755.
this worked perfectly to fix my problem, thanks :)
Thank you for the very quick response. I did change the permisions and added a product and I still get the same error
I tried and both IE and FF.
btw don't have dynamic image on.
Any other suggestions???
Which version did you upgrade from? no suggestions.
I did a fresh install.
I asked because you said 'I just upgraded to 1.1', did you try all my suggestions (http://forum.virtuemart.net/index.php?topic=35932.msg110796#msg110796) if so and still not working than I have no idea, oh make sure you have GD library installed in php
I did have the older version but I removed it and did a fresh install.
It's really strange because I can see the files on the admin side and on the ftp
it populates the resized files.
Anyone???
Here's a strange thing. I removed 1.1 and install 1.0 and I can now see the images but
on version 1.1 I cannot?
anyone???
anyone? I'm willing to pay for your help.
VirtueMart 1.1 is still in development stage, we can not concentrate on providing support and coding/fixing and etc, but just to make sure this is not a bug, I'll have a look PM me with necessary info.
Does it happen only on the browse page, or the fly page too? Could it be your template? Try using one of the defaults (like browse1, browse2) in your category. If it's a custom template, make sure your PHP is correct. The VM developer manual lists which variables are allowed for both the browse and fly pages. Some work in one but not the other (like long desc can't be in the browse page).
Other than that, you can check to make sure GD is enabled in Joomla. With 1.5, you go help--> system info--> php information. It's a huge list, so do a find for GD.
Hope this helps.
For the record, I've had problems with VM resizing my thumbnails even with "dynamic thumbnail resizing" unchecked. At least in build 1142, sometimes it resized them anyway (making mince meat of my transparent gifs) and I had to fix the file path in the DB. But this is different than them not showing up.
I had a look at the site, it seemed to be a Joomla issue.
As far as I understand the problem should have been solved with rev 1204. But It doesn't work even if I have disabled 'Dynamic Thumbnail Resizing'. So I did go back to rev 1203 and everything works fine, pics will be shown again.
patrik
Hi,
After a couple of years working with osCommerce I was looking for something new/better and more dynamically supported. So I stumbled upon Joomla and Virtuemart a little while back which looks just like the thing I am after ;D
I stumbled upon this thread and as I am experiencing something similar with my first picture assigned to a product my 2ct to this problem:
No thumbs are shown for me for the first picture on the category product page and also not on the product detail page. I can see though the full pictures and on the product page also the thumbs for the extra assigned pictures.
For the thumb of the first assigned picture I get a 'file not found' message because it looks like the parsed path is wrong (when compared to that of the thumbs for the extra pictures):
For the first picture thumb I have:
http://localhost/wheeloftime/htdocs/wotvirtuemart/components/com_virtuemart/show_image_in_imgtag.php?filename=resized%2FArt_Deco_large_m_47a87c94075a5_90x90.jpg&newxsize=90&newysize=90&fileout=
For the second and other picture thumbs:
http://localhost/wheeloftime/htdocs/wotvirtuemart/components/com_virtuemart/show_image_in_imgtag.php?filename=%2Fcomponents%2Fcom_virtuemart%2Fshop_image%2Fproduct%2Ffotostandaardmarmergrootmodelmetspeltermeeuwartdeco1_pic1.jpg&newxsize=90&newysize=90&fileout=
The difference is there is no full path to the resized directory while it seems it is needed though.
My configuration:
Joomla 1.5 stable
Nightly build VirtueMart 1.1 revision 1214
Xampp for Linux: PHP 5.2.4 / MySQL 5.0.45
OS: Linux Ubunty Gutsy
Browser: Firefox 2.0.0.11
best regards,
Howard
found the code that produces the thumnails, from what i can gather it goes looking for the created date. The problem i have is that i'm +15hours time difference from my server. is there a way the code can be changed or flagged so that it will auto update from new pictures? or a manual create thumnail from the backend by a button to auto update thumnails?
tell me if i'm waay off target here.
this is the code i found in ps_product_files.php
it starts at line 128
function add( &$d ) {
global $mosConfig_absolute_path, $mosConfig_live_site,
$database, $VM_LANG, $vmLogger;
$db = new ps_DB;
$timestamp = time();
if (!$this->validate_add($d)) {
return False;
}
if( empty( $d["file_published"] )) {
$d["file_published"] = 0;
}
if( empty( $d["file_create_thumbnail"] )) {
$d["file_create_thumbnail"] = 0;
}
// Do we have an uploaded file?
if( !empty($_FILES['file_upload']['name']) ) {
// Uploaded file branch
$upload_success = false;
$fileinfo = pathinfo( $_FILES['file_upload']['name'] );
$ext = $fileinfo["extension"];
if( $this->fileexists ) {
// must rename uploaded file!
$filename = uniqid("ren_") . $_FILES['file_upload']['name'];
}
else {
$filename = $_FILES['file_upload']['name'];
}
// file_title...Beware of renaming files!
if( @$d["file_title"] == $_FILES['file_upload']['name'] ) {
if( $filename != $_FILES['file_upload']['name'] ) {
$d["file_title"] = $filename;
}
}
switch( $d["upload_dir"] ) {
case "IMAGEPATH":
$uploaddir = IMAGEPATH ."product/";
break;
case "FILEPATH":
$uploaddir = trim( $d["file_path"] );
if( !file_exists($uploaddir) ) {
@mkdir( $uploaddir );
}
if( !file_exists( $uploaddir ) ) {
$vmLogger->err( $VM_LANG->_PHPSHOP_FILES_PATH_ERROR );
return false;
}
if( substr( $uploaddir, strlen($uploaddir)-1, 1) != '/') {
$uploaddir .= '/';
}
break;
case "DOWNLOADPATH":
$uploaddir = DOWNLOADROOT;
break;
}
if( $this->checkUploadedFile( 'file_upload' ) ) {
$upload_success = $this->moveUploadedFile( 'file_upload', $uploaddir.$filename);
}
else {
$vmLogger->err( $VM_LANG->_PHPSHOP_FILES_UPLOAD_FAILURE );
return false;
}
if( @$d['file_type'] == "image" ) {
$is_image = "1";
$d["file_url"] = IMAGEURL."product/".$filename;
$file_contents = "";
if( $d["file_create_thumbnail"] == "1" ) {
## RESIZE THE IMAGE ####
require_once( CLASSPATH . "class.img2thumb.php" );
$fileout = $uploaddir . "resized/".basename($filename, ".".$ext)."_".PSHOP_IMG_WIDTH."x".PSHOP_IMG_HEIGHT.".$ext";
$tmp_filename = $uploaddir . $filename;
$newxsize = PSHOP_IMG_WIDTH;
$newysize = PSHOP_IMG_HEIGHT;
$maxsize = 0;
$bgred = $bggreen = $bgblue = 255;
/* We need to resize the image and Save the new one (all done in the constructor) */
$neu = new Img2Thumb($tmp_filename,$newxsize,$newysize,$fileout,$maxsize,$bgred,$bggreen,$bgblue);
if( is_file( $fileout ) ) {
$vmLogger->info( $VM_LANG->_PHPSHOP_FILES_IMAGE_RESIZE_SUCCESS );
$thumbimg = getimagesize( $fileout );
$file_image_thumb_width = $thumbimg[0];
$file_image_thumb_height = $thumbimg[1];
}
else {
$vmLogger->warning( $VM_LANG->_PHPSHOP_FILES_IMAGE_RESIZE_FAILURE );
$file_image_thumb_height = "";
$file_image_thumb_width = "";
}
$fullimg = getimagesize( $tmp_filename );
$file_image_width = $fullimg[0];
$file_image_height = $fullimg[1];
$filename = $tmp_filename;
}
}
else {
### File (no image) Upload ###
$is_image = "0";
$filename = $uploaddir . $filename;
$file_image_height = $file_image_width = $file_image_thumb_height = $file_image_thumb_width = "";
}
}
else {
if( $d['file_type'] == "image" ) {
$is_image = "1";
}
else {
$is_image = "0";
}
$filename = "";
$file_contents = "";
$ext = "";
$upload_success = true;
$file_image_height = $file_image_width = $file_image_thumb_height = $file_image_thumb_width = "";
}
$filename = $GLOBALS['vmInputFilter']->safeSQL( $filename );
$d["file_title"] = $GLOBALS['vmInputFilter']->safeSQL( $d["file_title"] );
$q = "INSERT INTO #__{vm}_product_files ";
$q .= "(file_product_id, file_name, file_title, file_extension, file_mimetype, file_url, file_published,";
$q .= "file_is_image, file_image_height , file_image_width , file_image_thumb_height, file_image_thumb_width )";
$q .= " VALUES ('".$d["product_id"]."', '$filename','".$d["file_title"] . "','$ext','".$_FILES['file_upload']['type']."', '".$d['file_url']."', '".$d["file_published"]."',";
$q .= "'$is_image', '$file_image_height', '$file_image_width', '$file_image_thumb_height', '$file_image_thumb_width')";
$db->setQuery($q);
$db->query();
return True;
}
This is the same problem that i am having. All worked fine until I changed the details in a category then the thumb of the product doesn't show even though it seems to be there. If you click on it the larger image opens. All permissions OK. Several themes tested. Error reproduced a couple of times now (arrrrg)
Do you any of you clever coders know what this might be?
Well, I just found one way out -I hope - Upgrade joomla to 1.5.2 and vm to 1.1.0