News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

[WORKAROUND] Thumbnails not showing virtuemart 1.1.2 with joomla 1.5.8

Started by xmcorporation, November 22, 2008, 04:24:24 AM

Previous topic - Next topic

doomed

Quote from: Joss on November 30, 2008, 14:09:34 PM
Okay - solved it

This site is on a virtual using Cpanel. We could not manage to get the ftp layer working so followed the joomla instructions of setting certain directories to 0777.

However, something must have changed on the server set up and this now caused the problems

Changing the Components directory to 755 solved the problem

I will also post this on the other related thread

I have changed my Components directory all files/folders inside to 755.

I still have the problem with thumbnails. If i "copy image url" i can see something like:

http://mydomain.net/website/components/com_virtuemart/show_image_in_imgtag.php?filename=resized%2FACCESS_POINT_CLI_4a17b204633c4_90x90.jpg&newxsize=90&newysize=90&fileout=

The above url shows no image at all, its like the server is not processing it or something.


Opening the large versions works ok.

Blix

I've the solution...

just go to configuration and tick Enable Dynamic Thumbnail Resizing?

did work for me

blans

We have the same trouble. All the images for products that I uploaded with CSV come  out fine but the images for products that I uploaded with VM don't.

In our case VM puts both the normal and the thumbnail image in the same /products folder instead of putting the thumbnail in the products/resized folder.

Switching to dynamic thumbnails indeed solved the problem but it's still strange because we want to use our own thumbnails not the dynamic generated ones.



Multilingual VM Webshop
Joomla 1.5.26
VM 1.1.9
Joomfish 2.1.7
Artio JoomSEF 3.8.2
CSVi VM 3.8.1

VM2 has the power of Magento and the usability of Opencart. I just can't get it to do what I managed to do with VM1 for so long...

compuhouse

Hi There,

i had the same problem as well... the thumbnails are not showing at all in the browse page but i can see them in the admin page. changing dir permissions didn't help, and ticking unticking the dynamic thumbnail didn't help aswell (when ticking the option the product pictures disappeared from the admin page) i started digging inside the files.

since the shop.browse page is using show_image_in_imgtag.php to display the thumbs i've downloaded the file and opened it with dreamweaver.

the file had the following:

<?php

/**

*

* @


Thats it... nothing else... (why?? i don't know but something happened and the code in this files is disappeared .. hack?? probably.. server security ..hmmm maybe)

any way... i reuploaded the original file and VOILA! it worked.

the original file for virtuemart 1.1.2

<?php
/**
* Image Resizer & img Tag "Filler"
*
* @author Andreas Martens <heyn@plautdietsch.de>
* @author Patrick Teague <webdude@veslach.com>
*
* @version $Id: show_image_in_imgtag.php 1279 2008-02-29 09:01:49Z soeren_nb $
* @package VirtueMart
* @subpackage core
* @copyright Copyright (C) 2004-2007 soeren - All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* VirtueMart is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See /administrator/components/com_virtuemart/COPYRIGHT.php for copyright notices and details.
*
* http://virtuemart.net
*/
define('_VALID_MOS'1);

// Get the Joomla! configuration file
$config_file '../../configuration.php';
include_once( 
$config_file );

if( !isset( 
$mosConfig_absolute_path ) ) {
// We are in J! 1.5
define'_JEXEC');
$mosConfig_absolute_path dirname$config_file );
}

include_once(
"../../administrator/components/com_virtuemart/virtuemart.cfg.php");

// Image2Thumbnail - Klasse einbinden 
include( CLASSPATH "ps_main.php");
include( 
CLASSPATH "class.img2thumb.php");

$basefilename = @basename(urldecode($_REQUEST['filename']));
$filenames[] = IMAGEPATH."product/".$basefilename;
$resized_filenames[] = IMAGEPATH."product/resized/".$basefilename;
$filenames[] = IMAGEPATH."category/".$basefilename;
$resized_filenames[] = IMAGEPATH."category/resized/".$basefilename;
$newxsize = (int)@$_REQUEST['newxsize'] == PSHOP_IMG_WIDTH : (int)@$_REQUEST['newxsize'];
$newysize = (int)@$_REQUEST['newysize'] == PSHOP_IMG_WIDTH : (int)@$_REQUEST['newysize'];
// Don't allow sizes beyond 2000 pixels
$newxsize min$newxsize2000 );
$newysize min$newysize2000 );

$maxsize false;
$bgred 255;
$bggreen 255;
$bgblue 255;

/*
if( !isset($fileout) )
$fileout="";
if( !isset($maxsize) )
$maxsize=0;
*/

/* Minimum security */
$file_exists false;
$i 0;
foreach ( 
$filenames as $file ) {
if( file_exists$file ) ) {
$file_exists true;
$filename $file;
break;
} elseif( file_exists($resized_filenames[$i])) {
$file_exists true;
$filename $resized_filenames[$i];
break;
}
++$i;
}
$file_exists or die('File does not exist');

$filename2 $resized_filenames[$i];

$fileinfo pathinfo$filename );
$file str_replace(".".$fileinfo['extension'], ""$fileinfo['basename']);
// In class.img2thumb in the function NewImgShow() the extension .jpg will be added to .gif if imagegif does not exist.

// If the image is a gif, and imagegif() returns false then make the extension ".gif.jpg"

if( $fileinfo['extension'] == "gif") {
  if( 
function_exists("imagegif") ) {
    
$ext ".".$fileinfo['extension'];
    
$noimgif="";
  }
  else {
    
$ext ".jpg";
    
$noimgif ".".$fileinfo['extension'];
  }

else {
  
$ext =  ".".$fileinfo['extension'];
  
$noimgif="";
}

if( 
file_exists($filename2)) { 
$fileout $filename2;
} else {
$fileout dirname$filename2 ) .'/'.$file."_".$newxsize."x".$newysize.$noimgif.$ext;
}

// Tell the user agent to cache this script/stylesheet for an hour
$age 3600;
header'Expires: '.gmdate'D, d M Y H:i:s'time()+ $age ) . ' GMT' );
header'Cache-Control: max-age='.$age.', must-revalidate' );

if( 
file_exists$fileout ) ) {
  
/* We already have a resized image
  * So send the file to the browser */

  
switch(strtolower($ext))
{
case ".gif":
header ("Content-type: image/gif");
readfile($fileout);
break;
case ".jpg":
header ("Content-type: image/jpeg");
readfile($fileout);
break;
case ".png":
header ("Content-type: image/png");
readfile($fileout);
break;
}
}
else {
 
/* We need to resize the image and Save the new one (all done in the constructor) */
  
$neu = new Img2Thumb($filename,$newxsize,$newysize,$fileout,$maxsize,$bgred,$bggreen,$bgblue);
  

  
/* Send the file to the browser */
  
switch($ext)
{
case ".gif":
header ("Content-type: image/gif");
readfile($fileout);
break;
case ".jpg":
header ("Content-type: image/jpeg");
readfile($fileout);
break;
case ".png":
header ("Content-type: image/png");
readfile($fileout);
break;
}
}
?>


If you have the same problem maybe this is not the solution for you but if you check show_image_in_imgtag.php located in Components/Virtuemart the problem/solution has to be there.

Good luck all.... [SOLVED for me]

mallepiet

Help! Please!

After two nights of desperate trying, to get my Virtuemart images back. I need help!
Someone with a wise solution? Please try.


I have transferred a completely good working Joomla, from a test database to the final other database (different host), with Joompack backup.

Unpacked on final server,
Changed .htacces,
Configuration.php,
Relative path for Joomla tmp and log
Url's for Virtuemart

So all seems fine, site runs ok, all links work all good..... but no small image in productscroller?  :o

Ive Checked the path from VM  shop_image, .... All good.

Very strange . All pictures are there in VM backend.......no small pic in productscroller backend,  but when I click on where the pic should be. It opens perfect (big pic).

So all pictures seems fine and on the server!!!!!!!!!!!!!    ???   ???   ???



Now here is the trick.... When I changed the Theme in VM Config panel from "product list (no table, divbased)" to  "Flat product list 1 product per row" ....... The small pics appear!!!   :P

Now im thinking template.... Maybe wrong dimension somewhere? But even stranger this layout works for me on the test server!!!!

So the only thing I could think of  is ... chmod... and try to put all filles on 755 with ws-ftpro.
(don't know the best way to do so)

But still nothing......no pics.

2 days work now, probebly one little tik somewhere.


Please think with me ! and give me a next option. On the other server it works.. what did I forgot???

Thanks Pietje.

Pic: 



[attachment cleanup by admin]

Uriel

None of these options work for me....
Any other ideas ?

Thing is my site was working perfectly well showing thumbnails. It got hacked and restored and now its not working.

Something I just noticed :
/www/components/com_virtuemart/shop_image/product /resized
does not exist on the Server ? is this possibly why we having these issues?

www.scrapbooking-scrapbook.co.za
Joomla 1.0
VM 1.1.2
Managing Member of Hosting-Webdesign http://www.hosting-webdesign.co.za

sanala

Hi,
I had the same issue.
Changing the CHMOD on the component back to 755 fixed it.
Thank you all.