Announcement

Collapse
No announcement yet.

Problem turning invoice into pdf

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

  • Problem turning invoice into pdf

    I am unable to print or email invoices. I am up to date on everything, espocrm and advance pack.

    When I try to print an invoice I get a blank webpage vs a pdf.

    when I try to email an invoice I get a 500 error.

    i have no idea of how to fix this issue. My espocrm is installed on an amazon server.

  • #2
    Hello,
    could you check espocrm log (data/logs) and server error log?

    Comment


    • #3
      Here is what I found

      [2018-06-14 20:45:10] Espo.WARNING: E_WARNING: unlink(data/cache/application/languages/sr_RS.php): Permission denied {"code":2,"message":"unlink(data/cache/application/languages/sr_RS.php): Permission denied","file":"/var/www/espocrm/application/Espo/Core/Utils/File/Manager.php","line":587,"context":{"dirPath":"data/cache/application/languages","removeWithDir":true,"fileList":["cs_CZ.php","da_DK.php","de_DE.php","en_GB.php","e n_US.php","es_ES.php","es_MX.php","fr_FR.php","hr_ HR.php","hu_HU.php","id_ID.php","it_IT.php","lt_LT .php","nb_NO.php","nl_NL.php","pl_PL.php","pt_BR.p hp","ro_RO.php","ru_RU.php","sk_SK.php","sr_RS.php ","tr_TR.php","uk_UA.php","vi_VN.php","zh_CN.p hp"],"result":0,"file":"sr_RS.php","fullPath":"data/cache/application/languages/sr_RS.php"}} []
      [2018-06-14 20:45:10] Espo.WARNING: E_WARNING: unlink(data/cache/application/languages/tr_TR.php): Permission denied {"code":2,"message":"unlink(data/cache/application/languages/tr_TR.php): Permission denied","file":"/var/www/espocrm/application/Espo/Core/Utils/File/Manager.php","line":587,"context":{"dirPath":"data/cache/application/languages","removeWithDir":true,"fileList":["cs_CZ.php","da_DK.php","de_DE.php","en_GB.php","e n_US.php","es_ES.php","es_MX.php","fr_FR.php","hr_ HR.php","hu_HU.php","id_ID.php","it_IT.php","lt_LT .php","nb_NO.php","nl_NL.php","pl_PL.php","pt_BR.p hp","ro_RO.php","ru_RU.php","sk_SK.php","sr_RS.php ","tr_TR.php","uk_UA.php","vi_VN.php","zh_CN.p hp"],"result":0,"file":"tr_TR.php","fullPath":"data/cache/application/languages/tr_TR.php"}} []
      [2018-06-14 20:45:10] Espo.WARNING: E_WARNING: unlink(data/cache/application/languages/uk_UA.php): Permission denied {"code":2,"message":"unlink(data/cache/application/languages/uk_UA.php): Permission denied","file":"/var/www/espocrm/application/Espo/Core/Utils/File/Manager.php","line":587,"context":{"dirPath":"data/cache/application/languages","removeWithDir":true,"fileList":["cs_CZ.php","da_DK.php","de_DE.php","en_GB.php","e n_US.php","es_ES.php","es_MX.php","fr_FR.php","hr_ HR.php","hu_HU.php","id_ID.php","it_IT.php","lt_LT .php","nb_NO.php","nl_NL.php","pl_PL.php","pt_BR.p hp","ro_RO.php","ru_RU.php","sk_SK.php","sr_RS.php ","tr_TR.php","uk_UA.php","vi_VN.php","zh_CN.p hp"],"result":0,"file":"uk_UA.php","fullPath":"data/cache/application/languages/uk_UA.php"}} []
      [2018-06-14 20:45:10] Espo.WARNING: E_WARNING: unlink(data/cache/application/languages/vi_VN.php): Permission denied {"code":2,"message":"unlink(data/cache/application/languages/vi_VN.php): Permission denied","file":"/var/www/espocrm/application/Espo/Core/Utils/File/Manager.php","line":587,"context":{"dirPath":"data/cache/application/languages","removeWithDir":true,"fileList":["cs_CZ.php","da_DK.php","de_DE.php","en_GB.php","e n_US.php","es_ES.php","es_MX.php","fr_FR.php","hr_ HR.php","hu_HU.php","id_ID.php","it_IT.php","lt_LT .php","nb_NO.php","nl_NL.php","pl_PL.php","pt_BR.p hp","ro_RO.php","ru_RU.php","sk_SK.php","sr_RS.php ","tr_TR.php","uk_UA.php","vi_VN.php","zh_CN.p hp"],"result":0,"file":"vi_VN.php","fullPath":"data/cache/application/languages/vi_VN.php"}} []
      [2018-06-14 20:45:10] Espo.WARNING: E_WARNING: unlink(data/cache/application/languages/zh_CN.php): Permission denied {"code":2,"message":"unlink(data/cache/application/languages/zh_CN.php): Permission denied","file":"/var/www/espocrm/application/Espo/Core/Utils/File/Manager.php","line":587,"context":{"dirPath":"data/cache/application/languages","removeWithDir":true,"fileList":["cs_CZ.php","da_DK.php","de_DE.php","en_GB.php","e n_US.php","es_ES.php","es_MX.php","fr_FR.php","hr_ HR.php","hu_HU.php","id_ID.php","it_IT.php","lt_LT .php","nb_NO.php","nl_NL.php","pl_PL.php","pt_BR.p hp","ro_RO.php","ru_RU.php","sk_SK.php","sr_RS.php ","tr_TR.php","uk_UA.php","vi_VN.php","zh_CN.p hp"],"result":0,"file":"zh_CN.php","fullPath":"data/cache/application/languages/zh_CN.php"}} []
      [2018-06-14 20:45:10] Espo.WARNING: E_WARNING: rmdir(data/cache/application): Directory not empty {"code":2,"message":"rmdir(data/cache/application): Directory not empty","file":"/var/www/espocrm/application/Espo/Core/Utils/File/Manager.php","line":529,"context":{"dirPaths":["data/cache/application"],"result":true,"dirPath":"data/cache/application"}} []

      Comment


      • #4
        set permition to data folder 775
        also to know the reason of 500 error, check server error log, if it's possible

        Comment


        • #5
          I tried:

          sudo chmod -R 775 /var/www/espocrm/data

          Problem still persist. Any ideas?

          Comment


          • #6
            Without log, which can show the error reason, is really hard to help you

            Comment


            • #7
              I found it in a log:

              [Wed Jun 20 23:42:08.289126 2018] [:error] [pid 26306] [client 75.49.19.250:60282] PHP Fatal error: Undefined constant 'JSON_PRESERVE_ZERO_FRACTION' in /var/www/espocrm/application/Espo/Modules/Advanced/Services/Quote.php on line 73, referer: http://desk.pennassoc.com/
              [Wed Jun 20 23:42:18.044629 2018] [:error] [pid 18685] [client 75.49.19.250:60300] PHP Fatal error: Undefined constant 'JSON_PRESERVE_ZERO_FRACTION' in /var/www/espocrm/application/Espo/Modules/Advanced/Services/Quote.php on line 73, referer: http://desk.pennassoc.com/

              Comment


              • #8
                What php version do you use?

                "Documentation says that JSON_PRESERVE_ZERO_FRACTION is 'Available since PHP 5.6.6.'"

                Comment


                • #9
                  Got it fixed. I had to update php. Thank you for help!

                  Comment

                  Working...
                  X