Announcement

Collapse
No announcement yet.

Error at Printing to PDF

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error at Printing to PDF

    Hello,
    we have installed the EspoCRM version 5.0.5 and wanted to try out the new Feature 'Printing to PDF'. We have made all the steps described in

    But we got an en HTTP error 500. A view into the the server log shows the following error message:

    2018/02/18 22:12:59 [error] 25912#25912: *36111 FastCGI sent in stderr: "PHP message: PHP Fatal error: Function name must be a string in /volume1/web/espotest/application/Espo/Core/Htmlizer/Htmlizer.php on line 253" while reading response header from upstream, client: 127.0.0.1, server: espotest.localhost, request: "GET /?entryPoint=pdf&entityType=Einkaufszettel&entityId =5a89e8cb11e922490&templateId=5a89e7ec5f48bdd4a HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm/php-561b2d6e-b03e-456f-ae17-19c448de3921.sock:", host: "espotest.localhost"

    Do you have any idea?

  • #2
    Hello,
    could you check the permission to data folder. Your tamplate had to be created in data/cache/templates/, but it wasn't.

    Comment


    • #3
      Hello Tanya,

      thanks for answering. But that wasn't the problem. I've checked the permissions. They were all ok. So I've tried to create a new template and tested it by clicking 'Printing to PDF' after every change. Now I get no error - the PDF is coming up. GREAT! (Porbably something get wrong by playing around with the formatting...)
      But I have some new problems: a field of type 'Array' was always shown like empty (only the commas for separating the items were printed, the items themselves are not shown). Furthermore it seems that the feature 'Printing to PDF' doesn't support the internationalization - is there any possibility to access to the translations (e.g. the field 'status' returns the value 'Planned' instead of the german translation 'Geplant' as defined in the entity manager)?

      Comment


      • #4
        Enum translation will work in the next release.

        For array I think you can use {{#each fieldName}} {{this}} {{/each}}.

        Comment


        • #5
          Thanks for the announcement about the ernum translation.

          In spite of your idea I've no access to the content of an array. After studying https://github.com/zordius/lightncandy I've tried
          {{#each items}}{{@index}}: {{this}}<br>{{/each}}
          to access the content of the field 'items'. But I've got the following output although there are three entries in the array:
          0:
          1:
          2:

          The content is missing.

          Comment


          • #6
            Found a bug. Thanks, will be fixed

            Comment

            Working...
            X