Yetiforcecrm: [4.4.0] Can not add photo to PDF template

Created on 22 Aug 2018  Â·  11Comments  Â·  Source: YetiForceCompany/YetiForceCRM

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

  • YetiForce Version used: 4.4.0
  • Browser name and version: Google Chrome, Mozilla Firefox, Safari (all newest version)
  • Environment name and version: PHP 7.1, Apache
  • Operating System and version: Ubuntu 17.10

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

âť” question

Most helpful comment

All 11 comments

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.

@KatarzynaUlichnowska

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

How to do it?

Thank you very much for your response and support.

@mariuszkrzaczkowski thanks!

@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],

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

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'],

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

I tried svg but is not working as well

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

scsikid picture scsikid  Â·  3Comments

johntonji picture johntonji  Â·  3Comments

canomogollon picture canomogollon  Â·  3Comments

serbiaserbia picture serbiaserbia  Â·  3Comments

ldgbc picture ldgbc  Â·  3Comments