Mysterious error on trying to print PDF

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shalmaxb
    Senior Member
    • Mar 2015
    • 1606

    Mysterious error on trying to print PDF

    Hello, recently I have an error in printing PDF in one of my custom entities.
    Whenever I try to print a PDF, I get : Error on loading PDF Document (see screenshot).

    In the log: WARNING: E_WARNING: DOMDocument::loadHTML(): error parsing attribute name in Entity, line: 70

    The mysterious thing is, this happens only in the first record of the list view, when opening to detail view. From other record it is no problem to print as desired.

    Click image for larger version  Name:	pdf_error.jpg Views:	22 Size:	11.3 KB ID:	110952
    Last edited by shalmaxb; 10-08-2024, 01:07 PM. Reason: described more in detail which record is affected.
  • shalmaxb
    Senior Member
    • Mar 2015
    • 1606

    #2
    EDIT: It works from the list view.

    Comment

    • yuri
      Member
      • Mar 2014
      • 8453

      #3
      Is it reproducible with another PDF template?
      If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

      Comment

      • shalmaxb
        Senior Member
        • Mar 2015
        • 1606

        #4
        It is the same with all PDF templates of that entity and that record.

        Comment

        • yuri
          Member
          • Mar 2014
          • 8453

          #5
          There're quite a few google results for "error parsing attribute name in Entity" query. The error is related to HTML parsing. I didn't have a chance to look into.
          If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

          Comment

          • shalmaxb
            Senior Member
            • Mar 2015
            • 1606

            #6
            I read some of the articles about parsing and it often refers to the HTML tagging, which could have an error. But although looking to solve this problem the last few hours, I do not get it to work.
            How can the parse error be in only one record, but not in all the others? And if it would be a parse error, how does it appear in 4 different PDF of the same entity?

            Comment

            • shalmaxb
              Senior Member
              • Mar 2015
              • 1606

              #7
              elevated error log, this is the result, but I do not know to interpret:

              Code:
              [2024-10-09 11:05:54] ALERT: (0) Header values must be RFC 7230 compatible strings. :: GET / :: /var/www/vhosts/___ xxxxx ___/vendor/slim/psr7/src/Headers.php(294)
              [object] (InvalidArgumentException(code: 0): Header values must be RFC 7230 compatible strings. at /var/www/vhosts/___ xxxxx ___/vendor/slim/psr7/src/Headers.php:294)
              [stacktrace]
              #0 /var/www/vhosts/___ xxxxx ___/vendor/slim/psr7/src/Headers.php(259): Slim\Psr7\Headers->validateHeaderValue()
              #1 /var/www/vhosts/___ xxxxx ___/vendor/slim/psr7/src/Headers.php(226): Slim\Psr7\Headers->validateHeader()
              #2 /var/www/vhosts/___ xxxxx ___/vendor/slim/psr7/src/Headers.php(100): Slim\Psr7\Headers->prepareHeader()
              #3 /var/www/vhosts/___ xxxxx ___/vendor/slim/psr7/src/Message.php(125): Slim\Psr7\Headers->setHeader()
              #4 /var/www/vhosts/___ xxxxx ___/application/Espo/Core/Api/ResponseWrapper.php(67): Slim\Psr7\Message->withHeader()
              #5 /var/www/vhosts/___ xxxxx ___/application/Espo/EntryPoints/Pdf.php(87): Espo\Core\Api\ResponseWrapper->setHeader()
              #6 /var/www/vhosts/___ xxxxx ___/application/Espo/Core/EntryPoint/EntryPointManager.php(87): Espo\EntryPoints\Pdf->run()
              #7 /var/www/vhosts/___ xxxxx ___/application/Espo/Core/EntryPoint/Starter.php(184): Espo\Core\EntryPoint\EntryPointManager->run()
              #8 /var/www/vhosts/___ xxxxx ___/application/Espo/Core/EntryPoint/Starter.php(140): Espo\Core\EntryPoint\Starter->processRequestInternal()
              #9 /var/www/vhosts/___ xxxxx ___/application/Espo/Core/EntryPoint/Starter.php(122): Espo\Core\EntryPoint\Starter->processRequest()
              #10 /var/www/vhosts/___ xxxxx ___/application/Espo/Core/ApplicationRunners/EntryPoint.php(46): Espo\Core\EntryPoint\Starter->start()
              #11 /var/www/vhosts/___ xxxxx ___/application/Espo/Core/Application/RunnerRunner.php(79): Espo\Core\ApplicationRunners\EntryPoint->run()
              #12 /var/www/vhosts/___ xxxxx ___/application/Espo/Core/Application.php(78): Espo\Core\Application\RunnerRunner->run()
              #13 /var/www/vhosts/___ xxxxx ___/public/index.php(39): Espo\Core\Application->run()
              #14 {main}
              ​

              Comment

              Working...