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

VM 3.0.6 TCPDF ERROR: [Image] Unable to get the size of the image:

Started by stawebnice, March 02, 2015, 13:52:31 PM

Previous topic - Next topic

zerilou

I take the previous version of this file i got on my backup website

It s seem to work now.

/**
    * displays the logos of a VirtueMart plugin
    *
    * @author Valerie Isaksen
    * @author Max Milbers
    * @param array $logo_list
    * @return html with logos
    */
   protected function displayLogos ($logo_list) {

      $img = "";

      if (!(empty($logo_list))) {
         $url = JURI::root () . '/images/stories/virtuemart/' . $this->_psType . '/';
         if (!is_array ($logo_list)) {
            $logo_list = (array)$logo_list;
         }
         foreach ($logo_list as $logo) {
            if(!empty($logo)){
               $alt_text = substr ($logo, 0, strpos ($logo, '.'));
               $img .= '<span class="vmCart' . ucfirst($this->_psType) . 'Logo" ><img align="middle" src="' . $url . $logo . '"  alt="' . $alt_text . '" /></span> ';
            }
         }
      }
      return $img;
   }

lveronese

Thank you zerilou! It worked for me as well!
I read a lot of posts about this error and one of the "most popular causes" was the jpg/png format, but I can confirm that png images do work.
This error seems negligible but it is actually dangerous because the order emails are not sent so the shopper is not aware of the order, unless he/she logs into the VM backend.
Anyway, I replaced the code as you suggested and yes now the emails are sent and the error went away.
Thanks
Luciano

danDaniel

Hello,

Is it normal that we must take "old files" (from old version of virtuemart) to have a fonctionnal shop ? this is surprising ?

Is there a new version or correction for this version

Thanks

Milbo

Quote from: lveronese on May 03, 2017, 08:04:00 AM
one of the "most popular causes" was the jpg/png format, but I can confirm that png images do work.
It depends on the type of png. But even for me it is hard to determine which png will work and which not, so the general advice is to use jpg and have peace.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Milbo

Quote from: zerilou on April 20, 2017, 17:22:44 PM
Same problem for me.
Zerilou,
why the heck you post the whole function, when only one line is the interesting.


Quote from: zerilou on April 20, 2017, 17:22:44 PM
the solution is maybe here: /www/administrator/components/com_virtuemart/plugins/vmpspluging.php

I tried to change the image path to an absolute path.
Which is wrong, it must be an absolute URL.


protected function displayLogos ($logo_list) {

...
$img .= '<span class="vmCart' . ucfirst($this->_psType) . 'Logo" ><img align="middle" src="' . JUri::root(true).$url.'/'.$logo . '"  alt="' . $alt_text . '" /></span> ';
...


There here was just the Juri::root(true). Vm3.2.2 has now

$img .= '<span class="vmCart' . ucfirst($this->_psType) . 'Logo" ><img align="middle" src="' . JUri::root().$url.'/'.$logo . '"  alt="' . $alt_text . '" /></span> ';


The rest of the function above just checks if an image is available.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Gingerweb

I have the same issue after updating to 3.2.2
I notice that in my Paypal and Sagepay plugins the link to the default images doesnt work.
as in the dropdown for Default logo ( images/stories/virtuemart/payment) doesnt list the images that are definitely in that folder - so in my cart the images for these plugins used to show up and after the update they dont, and i get this error message.

Does this help fault find this bug perhaps ?

Milbo

Maybe you have a folder " images/virtuemart/payment" without the stories? The system looks then there, because the stories folder got removed by joomla
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Gingerweb

yes that was actually the case, i had made the folder because of the error i was getting - initially the : TCPDF ERROR: [Image] Unable to get the size of the image: /images/stories/virtuemart/vendor/bft.jpg
and then when i looked in the paypal plugin i was getting:

Warning
JFolder: :files: Path is not a folder. Path: /home/domain/public_html/images/virtuemart/payment

and creating the folder fixed that but obviously lost me the sage logo as you explained.

I am still at square one though with the TCPDF error which is still happening in the sagepay payment process and the Paypal logo still isnt showing up even though i have removed the above folder.

There is a broken image in the Sagepay sequence, trying to view that gives me the attached error, is this possibly related ?
when i refresh after the error and try and view the image the url is :

https://www.bluefrogtoys.co.uk//images/stories/virtuemart/payment/sagepay.jpg  (note the double //) the image does show up and it also shows up after a remove one of the slashes - that isnt right is it ?

thanks

Gingerweb

I have found the issue and i can now use Sagepay without error.
it looks like possibly the update changed the image path of for the payment

from /images/stories/virtuemart/vendor/bft.jpg
to /images/stories/virtuemart/payment/bft.jpg

as soon as i copied the image to the payment folder it works.

Hope this helps someone else, i left the image in both folders now in case it changes back again in another update !!

schenze

Hello,
i have the same problem with the TCPDF ERRor and had found the solution in the database table virtuemart_vendors_de_de for Germany.
You must change the path in
vendor_letter_header_html   varchar(8000)

<p><img src="images/banners/logo-topkoch.eu.jpg" alt="" /></p>

Right now has funcioned to create the invoice in pdf and the image was there and VM works.....

Greatings from germany

Joomla 3.7.0 with VM 3.2.2.

schenze

blackrat999