I am getting the following errors using Webform 7.x-alpha6 on a dev site.

Notice: Undefined index: in webform_handler_field_submission_data->render() (line 125 of .../sites/all/modules/contrib/webform/views/webform_handler_field_submission_data.inc)

and

Notice: Undefined index: 11 in webform_handler_field_submission_data->render() (line 118 of .../sites/all/modules/contrib/webform/views/webform_handler_field_submission_data.inc)

I'm actually getting six full pages of variations on the second one (with 7, 8, 10 and 11), all logged in the same minute.

I can give you access to the site if you want/need to poke around.

Comments

funkym’s picture

I ran into this issue when trying to export batch results of webform submission data using Views Data Export. With batch export mode enabled, I was only able to export 100 rows of webform submission data. When I turned off batch export mode, it worked just fine.

Looks like the !isset($this->view->_webform_submissions[$nid]) is preventing the batch export picking up submission data after 100+ rows. Removing the if !isset condition seemed to solve my issue.

/**
   * Load the node and submissions needed for this components values.
   */
  function pre_render(&$values) {
    $nid = $this->options['webform_nid'];
    $this->webform_node = node_load($nid);
    // Load all the submissions needed for this page. This is stored at the
    // view level to ensure it's available between fields so we don't load
    // them twice.
    //if (!isset($this->view->_webform_submissions[$nid])) {
      module_load_include('inc', 'webform', 'includes/webform.submissions');
      $this->view->_webform_submissions[$nid] = array();
      $sids = array();
      foreach ($values as $value) {
        $sids[] = $value->{$this->field_alias};
      }
      if ($sids) {
        $this->view->_webform_submissions[$nid] = webform_get_submissions(array('sid' => $sids));
      }
    //}
  }
labboy0276’s picture

Issue summary: View changes

I am still getting this error in 7.x-4.0-rc3 of this module. The solution in #1 doesnt do the trick, I am still debugging.

I am using a view of webform data and displaying data, not sure why this is doing this, here are my errors:

Notice: Undefined index: 7 in webform_handler_field_submission_data->render() (line 119 of /sites/all/modules/contrib/webform/views/webform_handler_field_submission_data.inc).
Notice: Undefined index: in webform_component_include() (line 4099 of /sites/all/modules/contrib/webform/webform.module).
Notice: Undefined index: in webform_handler_field_submission_data->render() (line 145 of /sites/all/modules/contrib/webform/views/webform_handler_field_submission_data.inc).

labboy0276’s picture

OK,

So I figured this out after a few rounds of debugging. Sometimes it seems that the cid may not be set for reasons not fully discovered. On my end it seems to be due to empty values. Anyway, I was able to get this to work with the first part of my patch, then I got another error (again due to empty values on the webform):

Notice: Undefined index: webform in webform_handler_field_submission_data->render() (line 136 of /var/www/csi-america/sites/all/modules/contrib/webform/views/webform_handler_field_submission_data.inc).

I resolved that as well in this patch.

Hope this helps someone

danchadwick’s picture

It is unclear to me how many different issues there are. I suspect that @labboy0276 has a different issue relating to what version of webfomr was used to define the view. I think protecting the code with the if clause as suggested in the patch is wise.

I'm not sure what issue the OP had.

Comment #1 looks like it may be a different issue entirely. Does this still happen in the current development version?

danchadwick’s picture

Version: 7.x-4.0-alpha6 » 8.x-4.x-dev
Status: Active » Fixed
StatusFileSize
new2.05 KB

Several issues here:

1) The component id is missing from the webform. Often this might indicate an error in the configuration for the view. However, this should be handled. It is also completely possible for a view to be created using a given component and then that component to be deleted from the webform, or the view to be used on a different webform without that component. In either of these cases, no data will be displayed, and without a PHP notice.

2) The code was not correctly substituting the new webform when the a form_key was successfully used to match a component in the webform from the data to the component used to define the view. This incorrect node would case access to be incorrectly checked and conditionals to not be handled properly. In other common cases, the error would not be noticed.

3) In the event that a formkey search was performed but was unsuccessful, a PHP notice would be generated and would have the same functional result as 2) above.

Fixed and committed to 7.x-4.x and 8.x.

  • Commit 6921b9d on 7.x-4.x by DanChadwick:
    Issue #1812692 by labboy0276, DanChadwick: Fixed incomplete error...
  • Commit 0c548fe on 8.x-4.x by DanChadwick:
    Issue #1812692 by labboy0276, DanChadwick: Fixed incomplete error...

Status: Fixed » Closed (fixed)

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

danchadwick’s picture

Version: 8.x-4.x-dev » 7.x-4.x-dev
pdesai’s picture

Dan, the issue is still occurring with the latest version 7.x-4.10 and using Views with Views Data Export. Here are the errors:

Trying to get property of non-object in webform_handler_field_submission_data->render() (line 181 of /sites/all/modules/webform/views/webform_handler_field_submission_data.inc).
Trying to get property of non-object in webform_handler_field_submission_data->render() (line 184 of /sites/all/modules/webform/views/webform_handler_field_submission_data.inc).
Trying to get property of non-object in webform_handler_field_submission_data->render() (line 198 of /sites/all/modules/webform/views/webform_handler_field_submission_data.inc).
Trying to get property of non-object in webform_handler_field_submission_data->render() (line 199 of /sites/all/modules/webform/views/webform_handler_field_submission_data.inc).
Trying to get property of non-object in webform_handler_field_submission_data->render() (line 206 of /sites/all/modules/webform/views/webform_handler_field_submission_data.inc).

It only occurs when doing a batch export where the exported rows is greater than the batch segment. For example, I have batch segment set to 500. If the export is less than 500 rows, it doesn't give any errors, but if it is above 500, it gives the above error per row.

danchadwick’s picture

Re #9 -- that sounds unrelated. Views Data Export should properly initialize the view for each batch, and it seems that it doesn't. I would open an issue in that module's queue.

pdesai’s picture

Thanks Dan! I will request support on the Views Data Export module.

igonzalez’s picture

#1 I had the same problem exporting results with views data export module. This solution works for me.