Announcement

Collapse
No announcement yet.

Bad server response when emailing quote

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

  • 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.

  • #2
    Hi,

    What version of advanced pack do you have?

    Comment


    • #3
      Hi,
      1.10.0

      Comment


      • #4
        It's way old version. Incompatible with newer php and EspoCRM versions.
        Last edited by yuri; 05-29-2018, 07:57 AM.

        Comment


        • #5
          You can add " = array()" to the beforeSave function definitions to make it working.

          Comment


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

            Comment


            • #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


              • #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


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

                  Comment


                  • #10
                    Works great thanks !

                    Comment

                    Working...
                    X