While troubleshooting other issues, I found that webform_views with webform_submission_values do not have the keys 'entity_type' and 'field'. Since we use these values to populate the structure array, we should do a isset() check first.

xdebug output showing webform_submission_values do not have values for keys entity_type and field.

Comments

robpowell created an issue. See original summary.

robpowell’s picture

Issue summary: View changes
StatusFileSize
new37.74 KB
graber’s picture

Status: Active » Postponed (maintainer needs more info)

Please provide some information how this issue affects vbo_export module.

robpowell’s picture

Lines 111-125 in VboExportBase.php assumes that $field->options['entity_type'] and $field->options['entity_field'] will be populated and they are not for my webform view. This will give us errors saying these values are undefined - sorry deleted logs so I don't have it handy. I won't be able to supply a patch till tonight but just adding a isset, removes the errors:

    if (empty($structure)) {
      foreach ($this->view->field as $id => $field) {
        // Skip Views Bulk Operations field and excluded fields.
        if ($field->options['plugin_id'] === 'views_bulk_operations_bulk_form' || $field->options['exclude']) {
          continue;
        }
        $structure[$id] = [
          'id' => $id,
          'label' => $field->options['label'],
          'entity_type' => isset($field->options['entity_type']) ? $field->options['entity_type'] : '',
          'field' => isset($field->options['entity_field']) ? $field->options['label'] : '',
          'plugin_id' => $field->options['plugin_id'],
        ];
      }
    }

  • Graber committed 2d44e95 on 8.x-2.x
    Issue #2897189 by robpowell: Removed unnecessary variables.
    
graber’s picture

Status: Postponed (maintainer needs more info) » Needs review

Those were really totally unused variables, made it much more simple. Thanks!

graber’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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