Using Commerce Webform with the 4.0 branch of Webform. Since enabling the CW module, the following error appears on every page (not just the webform) on initial load:

Notice: Undefined index: #webform_component in theme_webform_element() (line 3306 of .../webform/webform.module).

The code concerned in Webform is:

// All elements using this for display only are given the "display" type.
  if (isset($element['#format']) && $element['#format'] == 'html') {
    $type = 'display';
  }
  else {
    $type = ($element['#webform_component']['type'] == 'select' && isset($element['#type'])) ? $element['#type'] : $element['#webform_component']['type'];
  }

(Line 3306 follows the 'else' statement)

Not sure if it's related to #1740268: Not compatible with webform conditionals , which appeared to be solved... but there's still the conflict with function theme_webform_element() in the current DEV release. Although the warning message can be hidden from end users, this message is just going to hose the error log, as the error is generated for every page request in the whole site.

Not sure of way forward on this...

Comments

Collins405’s picture

Just ran into this. Fresh install, enabled all required modules, created product SKU field on webform, and now error shows on every page. All seems to work ok though.

benjarlett’s picture

ditto...with
drupal 7.34
webform 4.2
commerce_webform 7.x-2.0-alpha3
any help much appreciated.

onepartscissors’s picture

Getting this error as well - tried to use Entity & Commerce Registration modules instead which is way more stable and reliable than this, but the fields interface isn't great for end-users creating forms, and also conditionals are only available via a very clunky third-party module.

So really wish this would work, but there's been no work on this module for years, i fear it's an orphan! :(

johnennew’s picture

Hey all, its not an orphan module! I've not been able to recreate this error.

Is anyone able to describe the options they have on the webform commerce product sku component? I've tried numerous different combinations but have yet to find a combination which generates the error described.

I am testing on a fresh install, latest Drupal, latest stable commerce (7.x-1.11) and webform (7.x-4.12) modules and 7.x-2.x latest dev release of commerce_webform

Can anyone experiencing this problem also specify their webform and commerce module versions as well.

Many thanks

johnennew’s picture

I just switched to the 7.x-2.0-alpha3 and the error appears. So it looks like this is fixed in head and we just need a new release from dev - will organise a a beta 1 release this week.

johnennew’s picture

Status: Active » Fixed

Release 7.x-2.0-alpha4 is now available which does not have this error in it.

johnennew’s picture

Status: Fixed » Closed (fixed)

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