Announcement

Collapse
No announcement yet.

$field name is Array in \Espo\Modules\Advanced\Core\Workflow\Utils::getFieldType

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

  • $field name is Array in \Espo\Modules\Advanced\Core\Workflow\Utils::getFieldType

    No idea why, but I get this in one of my workflows.
    $fieldName = Array ( [0] => parentId [1] => parentType )

    `Espo.WARNING: E_WARNING: Illegal offset type in isset or empty {"code":2,"message":"Illegal offset type in isset or empty","file":"/home3/r7t8n3t0/public_html/crm/VDF/application/Espo/Modules/Advanced/Core/Workflow/Utils.php","line":315,"context":{"entity":"[...`

  • #2
    Would be helpful if you attach a screenshot of the problem workflow edit view.

    Comment


    • #3
      I edited the code of my espo (5.5.6) instance to return null instead of causing an exception. This is the workflow....
      Click image for larger version  Name:	vivaldi_2019-02-07_00-38-31.png Views:	1 Size:	20.2 KB ID:	45842


      Click image for larger version  Name:	vivaldi_2019-02-07_00-41-31.png Views:	1 Size:	36.0 KB ID:	45843




      I also have trace for you, might be useful...

      Code:
      #  0 /public_html/application/Espo/Modules/Advanced/Core/Workflow/Actions/BaseEntity.php(56): Espo\Modules\Advanced\Core\Workflow\Utils::getFieldType(Object(Espo\Modules\Crm\Entities\Call), Array)
      #  1 /public_html/application/Espo/Modules/Advanced/Core/Workflow/Actions/BaseEntity.php(152): Espo\Modules\Advanced\Core\Workflow\Actions\BaseEntity->getValue('parent', Object(Espo\Modules\Crm\Entities\Call))
      #  2 /public_html/application/Espo/Modules/Advanced/Core/Workflow/Actions/CreateEntity.php(35): Espo\Modules\Advanced\Core\Workflow\Actions\BaseEntity->getDataToFill(Object(Espo\Modules\Crm\Entities\Call), Object(stdClass))
      #  3 /public_html/application/Espo/Modules/Advanced/Core/Workflow/Actions/Base.php(177): Espo\Modules\Advanced\Core\Workflow\Actions\CreateEntity->run(Object(Espo\Entities\Email), Object(stdClass))
      #  4 /public_html/application/Espo/Modules/Advanced/Core/Workflow/ActionManager.php(60): Espo\Modules\Advanced\Core\Workflow\Actions\Base->process(Object(Espo\Entities\Email), Object(stdClass))
      #  5 /public_html/application/Espo/Modules/Advanced/Core/Workflow/ActionManager.php(38): Espo\Modules\Advanced\Core\Workflow\ActionManager->runAction(Object(stdClass), '5c4122d44d61806...')
      #  6 /public_html/application/Espo/Modules/Advanced/Core/WorkflowManager.php(192): Espo\Modules\Advanced\Core\Workflow\ActionManager->runActions(Array)
      #  7 /public_html/application/Espo/Modules/Advanced/Hooks/Common/Workflow.php(44): Espo\Modules\Advanced\Core\WorkflowManager->process(Object(Espo\Entities\Email), 'afterRecordCrea...', Array)
      #  8 /public_html/application/Espo/Core/HookManager.php(119): Espo\Modules\Advanced\Hooks\Common\Workflow->afterSave(Object(Espo\Entities\Email), Array, Array)
      #  9 /public_html/application/Espo/Core/ORM/Repositories/RDB.php(277): Espo\Core\HookManager->process('Email', 'afterSave', Object(Espo\Entities\Email), Array)
      #  10 /public_html/application/Espo/Repositories/Email.php(346): Espo\Core\ORM\Repositories\RDB->afterSave(Object(Espo\Entities\Email), Array)
      #  11 /public_html/application/Espo/ORM/Repositories/RDB.php(157): Espo\Repositories\Email->afterSave(Object(Espo\Entities\Email), Array)
      #  12 /public_html/application/Espo/Core/ORM/Repositories/RDB.php(326): Espo\ORM\Repositories\RDB->save(Object(Espo\Entities\Email), Array)
      #  13 /public_html/application/Espo/Services/Record.php(495): Espo\Core\ORM\Repositories\RDB->save(Object(Espo\Entities\Email))
      #  14 /public_html/application/Espo/Services/Record.php(842): Espo\Services\Record->storeEntity(Object(Espo\Entities\Email))
      #  15 /public_html/application/Espo/Services/Email.php(267): Espo\Services\Record->create(Object(stdClass))
      #  16 /public_html/application/Espo/Core/Controllers/Record.php(98): Espo\Services\Email->create(Object(stdClass))
      #  17 /public_html/application/Espo/Core/ControllerManager.php(143): Espo\Core\Controllers\Record->actionCreate(Array, Object(stdClass), Object(Slim\Http\Request), Object(Slim\Http\Response))
      #  18 /public_html/application/Espo/Core/ControllerManager.php(159): Espo\Core\ControllerManager->processRequest(Object(Espo\Controllers\Email), 'create', Array, Object(stdClass), Object(Slim\Http\Request), Object(Slim\Http\Response))
      #  19 /public_html/application/Espo/Core/Application.php(281): Espo\Core\ControllerManager->process('Email', 'create', Array, '{"status":"Send...', Object(Slim\Http\Request), Object(Slim\Http\Response))
      #  20 [internal function]: Espo\Core\Application->Espo\Core\{closure}()
      #  21 /public_html/vendor/slim/slim/Slim/Slim.php(1210): call_user_func_array(Object(Closure), Array)
      #  22 /public_html/vendor/slim/slim/Slim/Slim.php(1356): Slim\Slim->applyHook('slim.before.dis...')
      #  23 /public_html/vendor/slim/slim/Slim/Middleware/Flash.php(85): Slim\Slim->call()
      #  24 /public_html/vendor/slim/slim/Slim/Middleware/MethodOverride.php(92): Slim\Middleware\Flash->call()
      #  25 /public_html/application/Espo/Core/Utils/Api/Auth.php(138): Slim\Middleware\MethodOverride->call()
      #  26 /public_html/application/Espo/Core/Utils/Api/Slim.php(125): Espo\Core\Utils\Api\Auth->call()
      #  27 /public_html/application/Espo/Core/Application.php(93): Espo\Core\Utils\Api\Slim->run()
      #  28 /public_html/api/v1/index.php(45): Espo\Core\Application->run()
      #  29 {main} [] []


      Comment


      • #4
        A quick related question... is the espo formula in action block executed before or after the field assignments made with dropdowns ?

        Comment


        • #5
          datetime\DayOfWeek - wrong function name

          > is the espo formula in action block executed before or after the field assignments made with dropdowns
          After.

          Comment


          • #6
            Originally posted by yurikuzn View Post
            datetime\DayOfWeek - wrong function name

            > is the espo formula in action block executed before or after the field assignments made with dropdowns
            After.
            Thanks. I'll let you know if I have that warning again in the logs.

            Comment


            • #7
              I got the error again today in the logs. This is the current code of the create entity action:
              Click image for larger version

Name:	vivaldi_2019-02-11_15-46-50.png
Views:	524
Size:	9.1 KB
ID:	46067
              Attached Files

              Comment


              • #8
                bumping this

                Comment


                • #9
                  bump; Did someone look into this? still getting this in 5.6.1.

                  What is that function supposed to return when called like this?
                  Code:
                  getFieldType(['parentId','parentType']);

                  Comment


                  • #10
                    bump too
                    Espo.WARNING: E_WARNING: Illegal offset type in isset or empty

                    Comment


                    • #11
                      Will be fixed.

                      Comment

                      Working...
                      X