Bad server response when emailing quote

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • thanassos
    Member
    • Jan 2017
    • 45

    Bad server response when emailing quote

    Hi After upgrading from 4.6 to 5.2.2 I've a big issue whith emailing my quotes.
    I have a bad server response.


    Here is the espo log I got :
    Code:
    [2018-05-28 07:21:38] [URL="http://espo.error/"]Espo.ERROR:[/URL] Uncaught Exception Error: "Cannot use object of type stdClass as array" at /var/www/vhosts/[URL="https://forum.espocrm.com/core/chrome-extension://chlffgpmiacpedhhbkiomidkjlcfhogd/espo.etsprotection.fr/httpdocs/application/Espo/Modules/Advanced/Controllers/Quote.php"]espo.etsprotection.fr/httpdocs/application/Espo/Modules/Advanced/Controllers/Quote.php[/URL] line 43 {"exception":"[object] (Error(code: 0): Cannot use object of type stdClass as array at /var/www/vhosts/[URL="https://forum.espocrm.com/core/chrome-extension://chlffgpmiacpedhhbkiomidkjlcfhogd/espo.etsprotection.fr/httpdocs/application/Espo/Modules/Advanced/Controllers/Quote.php:43)"]espo.etsprotection.fr/httpdocs/application/Espo/Modules/Advanced/Controllers/Quote.php:43)[/URL]"} []
    Code:
    Espo.WARNING: E_WARNING: Declaration of Espo\Modules\Advanced\Repositories\Quote::beforeSave(Espo\ORM\Entity $entity, array $options) should be compatible with Espo\Core\ORM\Repositories\RDB::beforeSave(Espo\ORM\Entity $entity, array $options = Array) {"code":2,"message":"Declaration of Espo\\Modules\\Advanced\\Repositories\\Quote::beforeSave(Espo\\ORM\\Entity $entity, array $options) should be compatible with Espo\\Core\\ORM\\Repositories\\RDB::beforeSave(Espo\\ORM\\Entity $entity, array $options = Array)","file":"/var/www/vhosts/espo.etsprotection.fr/httpdocs/application/Espo/Modules/Advanced/Repositories/Quote.php","line":0,"context":{"file":"/var/www/vhosts/espo.etsprotection.fr/httpdocs/vendor/composer/../../application/Espo/Modules/Advanced/Repositories/Quote.php"}} []



    Other Errors :
    Code:
    [2018-05-28 07:35:58] Espo.WARNING: E_WARNING: Declaration of Espo\Modules\Advanced\Controllers\MailChimp::actionUpdate($params, $data) should be compatible with Espo\Core\Controllers\Record::actionUpdate($params, $data, $request) {"code":2,"message":"Declaration of Espo\\Modules\\Advanced\\Controllers\\MailChimp::actionUpdate($params, $data) should be compatible with Espo\\Core\\Controllers\\Record::actionUpdate($params, $data, $request)","file":"/var/www/vhosts/espo.etsprotection.fr/httpdocs/application/Espo/Modules/Advanced/Controllers/MailChimp.php","line":19,"context":{"file":"/var/www/vhosts/espo.etsprotection.fr/httpdocs/vendor/composer/../../application/Espo/Modules/Advanced/Controllers/MailChimp.php"}} []
    Ive had to set my php version to 7.0.30 to be able to import my quote as PDF but works now.
  • yuri
    Member
    • Mar 2014
    • 8438

    #2
    Hi,

    What version of advanced pack do you have?
    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

    • thanassos
      Member
      • Jan 2017
      • 45

      #3
      Hi,
      1.10.0

      Comment

      • yuri
        Member
        • Mar 2014
        • 8438

        #4
        It's way old version. Incompatible with newer php and EspoCRM versions.
        Last edited by yuri; 05-29-2018, 07:57 AM.
        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

        • yuri
          Member
          • Mar 2014
          • 8438

          #5
          You can add " = array()" to the beforeSave function definitions to make it working.
          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

          • thanassos
            Member
            • Jan 2017
            • 45

            #6
            could you give me little more precisions like where to put this modification?

            Comment

            • tanya
              Senior Member
              • Jun 2014
              • 4308

              #7
              In each error you have the class name.
              for example class Espo\Modules\Advanced\Repositories\Quote you can find in application/Espo/Modules/Advanced/Repositories/Quote.php
              protected function beforeSave(Entity $entity, array $options = array())



              Espo\Modules\Advanced\Controllers\MailChimp::actio nUpdate

              application/Espo/Modules/Advanced/Controllers/MailChimp.php
              public function actionUpdate($params, $data, $request)

              Comment

              • thanassos
                Member
                • Jan 2017
                • 45

                #8
                Still have the error
                Code:
                [2018-05-29 12:37:29] [URL="http://espo.error/"]Espo.ERROR:[/URL] Uncaught Exception Error: "Cannot use object of type stdClass as array" at /var/www/vhosts/[URL="https://forum.espocrm.com/core/chrome-extension://chlffgpmiacpedhhbkiomidkjlcfhogd/espo.etsprotection.fr/httpdocs/application/Espo/Modules/Advanced/Controllers/Quote.php"]espo.etsprotection.fr/httpdocs/application/Espo/Modules/Advanced/Controllers/Quote.php[/URL] line 43 {"exception":"[object] (Error(code: 0): Cannot use object of type stdClass as array at /var/www/vhosts/[URL="https://forum.espocrm.com/core/chrome-extension://chlffgpmiacpedhhbkiomidkjlcfhogd/espo.etsprotection.fr/httpdocs/application/Espo/Modules/Advanced/Controllers/Quote.php:43)"]espo.etsprotection.fr/httpdocs/application/Espo/Modules/Advanced/Controllers/Quote.php:43)[/URL]"} []

                Comment

                • tanya
                  Senior Member
                  • Jun 2014
                  • 4308

                  #9
                  you have $data['{parameter}'] in this file,
                  change matches to $data->{parameter}

                  Comment

                  • thanassos
                    Member
                    • Jan 2017
                    • 45

                    #10
                    Works great thanks !

                    Comment

                    Working...