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

Milbo

Good to hear and yes I assume the stuff works on a linux with utf8 filesystem
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

tanolalano

Same error to my site after update to last version of VM 3
My config:
VM 3.2.1
J 3.6.5
Php 7.0.4
5.5.5-MariaDB

So confirmation email has not been sent to the Customer and to vendor.

I read the last posts and contact the developer of template (spyros) in this thread, and
even after a couple of suggested changes emails is not sent.

-------------------------------EDIT----------

After disable invoice creation for order status in VM config email was corectly sent.
In the received email shipping logo and payment logo was missing

Other suggestions?
Regards
arancebio.it - Organic red Oranges from Sicily

Rune Rasmussen

@tanolalano - you seems to have trouble with shipping images, while this was more about product images. Still it's probably related in some way, meaning TcPDF not being able to process the data from VM.

Note! Since the order data is saved in database, including image link I think, you need to test the new image on a new order (or edit the data in database).
Rune Rasmussen - https://www.syntaxerror.no/

Norwegian Translation Team

tanolalano

Quote from: Rune Rasmussen on April 10, 2017, 13:33:03 PM
@tanolalano - you seems to have trouble with shipping images, while this was more about product images. Still it's probably related in some way, meaning TcPDF not being able to process the data from VM.

Note! Since the order data is saved in database, including image link I think, you need to test the new image on a new order (or edit the data in database).
I do some test order getting same result as for old image and for new .jpg .gif or .png :(
arancebio.it - Organic red Oranges from Sicily

Rune Rasmussen

Also remember to re-save images with correct file format, don't just rename them - if that is what you did.


Oh, and also try just lower case letters (small), no spaces or special characters.
Rune Rasmussen - https://www.syntaxerror.no/

Norwegian Translation Team

tanolalano

Quote from: Rune Rasmussen on April 10, 2017, 13:57:19 PM
Also remember to re-save images with correct file format, don't just rename them - if that is what you did.
Yes, Edit it in PS
arancebio.it - Organic red Oranges from Sicily

neox2007

I have noticed that even though the images of shipping / payment methods are broken in the customer confirmation email.

Maybe the problem is not with TCPDF.

Rune Rasmussen

neox2007 is right, there is a issue with shipping/payment logos in VM 3.2.1 mails.

I installed 3.0.18 and tested it successfully, but after updating to 3.2.1 only image name is displayed in the mail. There is no problem with the pdf generation though, there the shipping image displays fine. Tested using default Beez3 without any overrides, and also latest Hera template.
Rune Rasmussen - https://www.syntaxerror.no/

Norwegian Translation Team

tanolalano

Spyros report the issue on VM 3.2.x
"..the image paths for shipment/payment methods are relative instead of absolute and so the images are always missing in the mail."
so Invoice cannot be created end return the TCPDF Error
Maybe fix in next release.



arancebio.it - Organic red Oranges from Sicily

Rune Rasmussen

tanolalano - read what I wrote. The pdf generation works fine for me!
Post your image as you was asked to do.
Rune Rasmussen - https://www.syntaxerror.no/

Norwegian Translation Team

tanolalano

Quote from: Rune Rasmussen on April 11, 2017, 08:22:24 AM
tanolalano - read what I wrote. The pdf generation works fine for me!
Post your image as you was asked to do.
Here the image
arancebio.it - Organic red Oranges from Sicily

Rune Rasmussen

SO I see no problem using your png and jpg image (or any other) for shipping/payment in VM 3.2.1 with Hera 3.8.1 template.



Rune Rasmussen - https://www.syntaxerror.no/

Norwegian Translation Team

Rune Rasmussen

PS! You forgot to mention you're using some custom third party cart ...
Rune Rasmussen - https://www.syntaxerror.no/

Norwegian Translation Team

tanolalano

arancebio.it - Organic red Oranges from Sicily

zerilou

Same problem for me.

the solution is maybe here: /www/administrator/components/com_virtuemart/plugins/vmpspluging.php

I tried to change the image path to an absolute path. I've got no more image but the invoice could be generated.
It can not be a good solution.

Thanks for your help.
Last joomla, last virtuemart3.2.1

/**
    * 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))) {
         if(!class_exists('JFolder')){
            require(VMPATH_LIBS.DS.'joomla'.DS.'filesystem'.DS.'folder.php');
         }
         $url ='/images/virtuemart/' . $this->_psType ;

         if(!JFolder::exists( VMPATH_ROOT .$url)){
            $url = '/images/stories/virtuemart/' . $this->_psType;
            if(!JFolder::exists(VMPATH_ROOT .$url)){
               return $img;
            }
         }

         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="' . JUri::root(true).$url.'/'.$logo . '"  alt="' . $alt_text . '" /></span> ';
            }
         }
      }
      return $img;
   }