yngens Posted May 12, 2014 Report Posted May 12, 2014 Invoice Logo is uploaded, but is not showing. I tried to upload files in different formats and can see the files in ls -l /home/username/public_html/uploads/1/invoices total 64 -rw-r--r-- 1 username username 8299 May 11 21:26 inv_logo.jp2 -rw-r--r-- 1 username username 11736 May 11 21:15 inv_logo.jpg -rw-r--r-- 1 username username 1874 May 11 21:06 inv_logo.png -rw-r--r-- 1 username username 36400 May 11 21:23 inv_logo.tiff but none of them showing in PDF. Quote
0 Michael Posted May 12, 2014 Report Posted May 12, 2014 You need to upload them via the tool: /settings/company/billing/customization/ Look and Feel section. Quote
0 yngens Posted May 12, 2014 Author Report Posted May 12, 2014 You need to upload them via the tool: /settings/company/billing/customization/ Look and Feel section. Of course, I did so. Still not showing. Quote
0 Tyson Posted May 12, 2014 Report Posted May 12, 2014 Does a thumbnail of the image appear on the /settings/company/billing/customization/ page? Is the uploads directory (/settings/system/general/basic/) writable? Is the GD extension available in php? Michael 1 Quote
0 yngens Posted May 12, 2014 Author Report Posted May 12, 2014 Does a thumbnail of the image appear on the /settings/company/billing/customization/ page? Is the uploads directory (/settings/system/general/basic/) writable? Is the GD extension available in php? No, there is no any thumbnail of the image on /settings/company/billing/customization/ page Yes, the upload directory is writable and in fact, as I mentioned earlier, I can see the file has been uploaded to /home/username/public_html/uploads/1/invoices: ls -l /home/username/public_html/uploads/1/invoices total 64 -rw-r--r-- 1 username username 8299 May 11 21:26 inv_logo.jp2 -rw-r--r-- 1 username username 11736 May 11 21:15 inv_logo.jpg -rw-r--r-- 1 username username 1874 May 11 21:06 inv_logo.png -rw-r--r-- 1 username username 36400 May 11 21:23 inv_logo.tiff And yeas php GD in installed: yum install php-gd Loaded plugins: fastestmirror, priorities Loading mirror speeds from cached hostfile * base: mirrors.usc.edu * updates: mirror.san.fastserv.com 36 packages excluded due to repository priority protections Setting up Install Process Package php-gd-5.3.3-27.el6_5.i686 already installed and latest version Nothing to do Quote
0 Tyson Posted May 13, 2014 Report Posted May 13, 2014 Have you tried to see if *any* image will appear in the background besides your new invoice logo? Even something small, like a logo image, should appear at the top left of the PDF. Quote
0 yngens Posted May 13, 2014 Author Report Posted May 13, 2014 Have you tried to see if *any* image will appear in the background besides your new invoice logo? Even something small, like a logo image, should appear at the top left of the PDF. Unfortunately, nothing seems to appear. Can this issue about the method PDF is generated? Maybe I nee to try another method? Quote
0 yngens Posted May 15, 2014 Author Report Posted May 15, 2014 Any more advices on this? I tried all possible ways including reformatting the logo in different formats: png, tiff, jpg. Still no joy. So I start thinking that the script on my server which is responsible for generating PDF is missing something and would like to re-install it. But only if I knew which script or program, Blesta doesn't tell. Quote
0 Paul Posted May 15, 2014 Report Posted May 15, 2014 Are there any functions excluded via your php.ini file? TCPDF is pretty stand-alone, except for utilizing GD when necessary. Haven't heard of anyone else having this issue who had GD working. Quote
0 yngens Posted May 15, 2014 Author Report Posted May 15, 2014 Are there any functions excluded via your php.ini file? TCPDF is pretty stand-alone, except for utilizing GD when necessary. Haven't heard of anyone else having this issue who had GD working. Nop, no any exclusions, it is pretty much standard stack CentOS 6.5 distro. To be exact: cat /etc/*release* CentOS release 6.5 (Final) LSB_VERSION=base-4.0-ia32:base-4.0-noarch:core-4.0-ia32:core-4.0-noarch cat: /etc/lsb-release.d: Is a directory CentOS release 6.5 (Final) CentOS release 6.5 (Final) cpe:/o:centos:linux:6:GA Running 'php -i | grep GD' gives: GD Support => enabled GD Version => bundled (2.0.34 compatible) After reading your comment I was not sure if TCPDF was part of php-gd or was I supposed to have TCPDF installed additionally (no instructions on this in the Blesta tutorials, btw), but I went ahead and installed it anyway per http://www.tcpdf.org/installation.php and now running 'php -i | grep tcpdf' gives: PWD => /var/www/tcpdf _SERVER["PWD"] => /var/www/tcpdf Anyway, no luck in getting the logo in the pdf files. Should I try to install Imagick? Quote
0 PauloV Posted May 15, 2014 Report Posted May 15, 2014 Nop, no any exclusions, it is pretty much standard stack CentOS 6.5 distro. To be exact: cat /etc/*release*CentOS release 6.5 (Final)LSB_VERSION=base-4.0-ia32:base-4.0-noarch:core-4.0-ia32:core-4.0-noarchcat: /etc/lsb-release.d: Is a directoryCentOS release 6.5 (Final)CentOS release 6.5 (Final)cpe:/o:centos:linux:6:GARunning 'php -i | grep GD' gives: GD Support => enabledGD Version => bundled (2.0.34 compatible)After reading your comment I was not sure if TCPDF was part of php-gd or was I supposed to have TCPDF installed additionally (no instructions on this in the Blesta tutorials, btw), but I went ahead and installed it anyway per http://www.tcpdf.org/installation.php and now running 'php -i | grep tcpdf' gives: PWD => /var/www/tcpdf_SERVER["PWD"] => /var/www/tcpdfAnyway, no luck in getting the logo in the pdf files. Should I try to install Imagick? can you PM your logo to test it in our Blesta Dev? Or open your logo image with an image editor and save it in .jpg format (do it even if you have already a .jpg image just save with anouther name) then upload the image and it will be resolved Sometimes images that have an extension defined are not in that format and can cause erros. For exemple if you have a .bmp or .gif image and you only change the extension to .jpg it dosent format the image but you can still open without problems Im 80% sure that is the problem Quote
0 yngens Posted May 15, 2014 Author Report Posted May 15, 2014 can you PM your logo to test it in our Blesta Dev? Or open your logo image with an image editor and save it in .jpg format (do it even if you have already a .jpg image just save with anouther name) then upload the image and it will be resolved Sometimes images that have an extension defined are not in that format and can cause erros. For exemple if you have a .bmp or .gif image and you only change the extension to .jpg it dosent format the image but you can still open without problems Im 80% sure that is the problem Unfortunately, saving the logo with .jpg extension and uploading didn't resolve the issue. I've also tried to upload Blesta logo - it just doesn't take it. But the files are uploaded fine, I can see them through SSH. It's just pdf is failing to be generated together with the logo. I've PMed the logo to you. Quote
0 PauloV Posted May 16, 2014 Report Posted May 16, 2014 This is a confirmed bug (by me, an i also tested on yngens blesta instalation) in the latest Blesta 3.2 Here is how to reproduce it: If you have alredy installed like me, and alredy had setup a logo in settings->company->billing->customization, just click on the X to remove the logo and save 1º - You will see the first bug, that the "no image" error is shown 2º- In database the "Table: company_settings, Key: inv_logo, company_id: 1 Value: " that the value still exists and is not cleaned Now trie to upload an image in a diferent extension, for exemple, if you had befor a .JPG file, trie to upload a .PNG file, it will upload the file, but it will not update the database value key entrie and so it will not show the logo, and also no error message Here is how to quick fix it until Blesta fixes it Here is how to you make it work for now until Blesta fix it: Open your blesta database in phpMyAdmin, click on the top click on the top right click on "SQL" and put this code Change below "[your root path]" with your root path to uploads directory, and also change the image extension to outher than .png if you have anouther type of image: UPDATE `company_settings` SET `value` = '/[your root path]/uploads/1/invoices/inv_logo.png' WHERE `company_settings`.`key` = 'inv_logo'; now execute. Finally go in FTP and see if there is a logo named "inv_logo.png" in the folder /[your root path]/uploads/1/invoices/uploads/1/invoices/, if not, save your logo as png, rename it to "inv_logo.png" and upload. For now its fixed Paul/Tyson/Cody do you need a new Bug tread opened or this is fine? Quote
0 Tyson Posted May 16, 2014 Report Posted May 16, 2014 Thanks for confirming it, PauloV. This has been fixed for v3.2.1, and there are instructions on pre-patching this issue yourself under CORE-1244 in the meantime. Michael and PauloV 2 Quote
0 yngens Posted May 16, 2014 Author Report Posted May 16, 2014 Glad it's been finally fixed. It is a real relief to know it was not some kind of wrong actions on our part. Michael 1 Quote
Question
yngens
Invoice Logo is uploaded, but is not showing. I tried to upload files in different formats and can see the files in
ls -l /home/username/public_html/uploads/1/invoices
total 64
-rw-r--r-- 1 username username 8299 May 11 21:26 inv_logo.jp2
-rw-r--r-- 1 username username 11736 May 11 21:15 inv_logo.jpg
-rw-r--r-- 1 username username 1874 May 11 21:06 inv_logo.png
-rw-r--r-- 1 username username 36400 May 11 21:23 inv_logo.tiff
but none of them showing in PDF.
14 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.