YetiForceCompany / YetiForceCRM

Our team created for you one of the most innovative CRM systems that supports mainly business processes and allows for customization according to your needs. Be ahead of your competition and implement YetiForce!
https://yetiforce.com
Other
1.68k stars 727 forks source link

[4.4.0] Can not add photo to PDF template #7773

Closed turek93 closed 5 years ago

turek93 commented 5 years ago

Issue

Hello, after installing the new version of YetiForce 4.4.0 I can not add photos to the template. This is important for printed reports, invoices, offers from the system on paper with the company logo.

Actual Behavior

After adding the image in the jpg, png etc format to the pdf template it does not appear on the printout.

Expected Behavior

I would like to receive a company logo on paper on a PDF file. In the future, many people will probably add photos to PDF templates.

How to trigger the error

Path to reproduce the problem:

  1. Adds a new PDF template
  2. I upload the company logo
  3. I get url photos, e.g. htttp: //customurl.com/layouts/resources/Logo/company_logo.jpg
  4. Obtains the attribute in the source code with the file path
  5. The photo shows itself in the preview
  6. After saving and trying to print from the module, the pictures do not add up
  7. An empty space appears

    Screenshot of configuration

PHP/Apache/Browser Logs

Your Environment

The problem concerns files with the extension jpg png etc. I found a workaround by changing the file format to base64. Then everything works correctly.

I checked and the same problem occurs on gitstable.yetiforce.com Please, let me know what the problem may be Greeting Wojtek

KatarzynaUlichnowska commented 5 years ago

Hello, please enclose the template. The system by default blocks the loading of external photos, so you need to add the domain to the trusted ones and then upload. Wojtek, I suppose you are Polish, so have a look here as it is in Polish and was very similar to your issue.

vovpff commented 5 years ago

@KatarzynaUlichnowska

so you need to add the domain to the trusted ones and then upload

How to do it?

mariuszkrzaczkowski commented 5 years ago

https://github.com/YetiForceCompany/YetiForceCRM/issues/7705#issuecomment-414208372

turek93 commented 5 years ago

Thank you very much for your response and support.

vovpff commented 5 years ago

@mariuszkrzaczkowski thanks!

ldgbc commented 5 years ago

@turek93 @vovpff Do you guys know how it work? Is it like this?

'PURIFIER_ALLOWED_DOMAINS' => [www.github.com/*;www.yetiforce.com/*], 

or maybe? 'PURIFIER_ALLOWED_DOMAINS' => [github.com], 'PURIFIER_ALLOWED_DOMAINS' => [yetiforce.com], or maybe? 'PURIFIER_ALLOWED_DOMAINS' => [.github.com/], 'PURIFIER_ALLOWED_DOMAINS' => [.yetiforce.com/],

Also any idea how to add local image?

Maybe? 'PURIFIER_ALLOWED_DOMAINS' => [127.0.0.1:123/],

or Maybe? 'PURIFIER_ALLOWED_DOMAINS' => [C:\image\logo.jpg], or Maybe? 'PURIFIER_ALLOWED_DOMAINS' => [\storage\logo.jpg],

mariuszkrzaczkowski commented 5 years ago

'PURIFIER_ALLOWED_DOMAINS' => ['github.com','yetiforce.com','img.yetiforce.com'],

LukeLak commented 5 years ago

I am using yetiforce 4.4.0 and have added this, but it is not saving in the template. Why?

'PURIFIER_ALLOWED_DOMAINS' => ['mycrm.domain.eu'],

mjapple commented 4 years ago

I am trying to add images from crm directory itself <img src="/logo.png"> but after saving and finishing the images are disappearing ...

mjapple commented 4 years ago

I tried svg but is not working as well

mariuszkrzaczkowski commented 4 years ago

open a new issue, this one is now out of date