There is an error message on top of Task Console saying:
Notice: Undefined index: #items in content_type_task_maestro_set_process_variable_logic() (line 1282 of /var/www/html/drupal/sites/all/modules/maestro/maestro.module).

Comments

Hamid.D’s picture

I have the same problem

_randy’s picture

Status: Active » Postponed (maintainer needs more info)

So I gather you are setting a process variable from a content type task's field value?

In order to diagnose this issue, there would have to be some debugging done to determine what the field_data_column is being set to as well as what the $data array is being set to.

If you are able to dsm or log the values of those data elements are, that would help.

Also, I believe we use this functionality in one of our test flows. Are you able to run through the test flows to ensure this does indeed fail (or work)?

_randy’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

I can't seem to reproduce the issue. reopen if this is still happening.

andrii-severynenko’s picture

In maestro.module in function content_type_task_maestro_set_process_variable_logic
Before line:

$retval = $data['#items'][0][$field_data_column];

add this:

  if (!isset($data['#items'])) {
    return $current_value;
  }
larskleiner’s picture

Status: Closed (cannot reproduce) » Needs review
StatusFileSize
new434 bytes

I get this notice when I try to set a Maestro variable from a content type field value (a user entity reference field).

$data on line 1420 of maestro.module just returns an empty array.

Attached the patch for #4 which seems to fix this.

larskleiner’s picture

StatusFileSize
new1.16 KB

I get below warning with patch #5, attached patch should fix it.

Warning: key() expects parameter 1 to be array, null given in content_type_task_maestro_set_process_variable_logic()

_randy’s picture

Last patch looks Ok. Will commit.

_randy’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit 0c6346b on master, 8.x-1.x authored by larskleiner, committed by _randy:
    Commit fix for issue #1401986. Fix for process variable logic issue.