VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: aha on April 02, 2016, 05:43:43 AM

Title: Do we need this? from mediahandler.php
Post by: aha on April 02, 2016, 05:43:43 AM
In file
\administrator\components\com_virtuemart\helpers\mediahandler.php
line 

279 //Do we need this?
280   /*   if(!empty($this->file_url) && empty($this->file_url_thumb)){
281         $this->displayMediaThumb('',true,'',false);
282      }*/

off
Why?

But They Need
without them the second and subsequent picture in the administrative part of the list of products displayed incomprehensible delay.
If you make the line active all works well.
Title: Re: Do we need this? from mediahandler.php
Post by: Jörgen on April 02, 2016, 14:22:40 PM
Hello

I can see that this has been commented out since 3.0.12. Right now I use 3.0.8 and if I try to comment these lines in 3.0.8 I get the same results. What version are You using? I just can´t believe that this has been malfunctioning since ver 3.0.12 :)

When started this to show for You ?

regards

Jörgen @ Kreativ Fotografi

Title: Re: Do we need this? from mediahandler.php
Post by: aha on April 03, 2016, 07:58:51 AM
Quote from: Jörgen on April 02, 2016, 14:22:40 PM
Hello

I can see that this has been commented out since 3.0.12. Right now I use 3.0.8 and if I try to comment these lines in 3.0.8 I get the same results. What version are You using? I just can´t believe that this has been malfunctioning since ver 3.0.12 :)

When started this to show for You ?

regards

Jörgen @ Kreativ Fotografi

That's right. It started with version 3.0.12.
Up to version 3.0.11.4 is operating normally.

Regards
aha
Title: Re: Do we need this? from mediahandler.php
Post by: Milbo on April 04, 2016, 12:56:55 PM
Quote from: aha on April 02, 2016, 05:43:43 AM
In file
\administrator\components\com_virtuemart\helpers\mediahandler.php
line 

279 //Do we need this?
280   /*   if(!empty($this->file_url) && empty($this->file_url_thumb)){
281         $this->displayMediaThumb('',true,'',false);
282      }*/

off
Why?

Because the file_url_thumb is dynamically generated in displayMediaThumb by $file_url_thumb = $this -> getFileUrlThumb($width, $height); and so the $this->file_url_thumb is empty. It is now always empty, except an override is defined.
Title: Re: Do we need this? from mediahandler.php
Post by: jenkinhill on April 04, 2016, 13:07:12 PM
After a second/third etc image is uploaded & saved for a product it does not appear in the BE until the FE product page with that image is viewed. On refreshing the BE page the new thumb then appears.
Title: Re: Do we need this? from mediahandler.php
Post by: GJC Web Design on April 04, 2016, 17:08:21 PM
ah .. so the thumb is only created when FE accessed .. makes sense i guess