To rebuild the bug:

  1. Install Commerce 7.x-1.3, Rules 7.x-2.1, Webform 7.x-4.0-alpha4, Webform Rules 7.x-1.4, Commerce Webform 7.x-1.0-beta4; (all of them are the recommended releases)
  2. Create a webform and set a type of "Commerce product skus" components;
  3. fill the webform and click the "add to cart" button, the php error comes out.

The error screenshot is attached as follows.

Comments

tevih’s picture

Me too!! I was searching all over the google for the error - Here it is, not in .png form. Other issues have popped up, such as the submit email not being sent. "Add More" also doesn't work with this release.


•Notice: Undefined index: value in commerce_webform_update_webform_submission_productfield() (line 336 of /home3/adasyesh/public_html/sites/all/modules/commerce_webform/commerce_webform.module).
•Warning: Invalid argument supplied for foreach() in commerce_webform_update_webform_submission_productfield() (line 336 of /home3/adasyesh/public_html/sites/all/modules/commerce_webform/commerce_webform.module).

skyredwang’s picture

Status: Active » Needs review
StatusFileSize
new726 bytes

Simple fix

skyredwang’s picture

StatusFileSize
new1.02 KB

A new patch with metadata

Jabbtech’s picture

Priority: Major » Normal
Status: Needs review » Reviewed & tested by the community

thanks!

johnennew’s picture

Status: Reviewed & tested by the community » Closed (fixed)

Thanks all for the bug report and patch. Patch in #3 committed to development branch and will appear in the next release.

johnennew’s picture

Status: Closed (fixed) » Needs work

Jumped the gun a bit there.

I cannot reproduce this fault with the latest dev branch and the patch in #3 actually causes an error on my fresh Drupal 7.15 install:

Warning: json_decode() expects parameter 1 to be string, array given in commerce_webform_update_webform_submission_productfield() (line 337 of /Users/johnennew/Sites/commerce-webform/sites/all/modules/commerce_webform/commerce_webform.module).
Notice: Trying to get property of non-object in commerce_webform_update_webform_submission_productfield() (line 338 of /Users/johnennew/Sites/commerce-webform/sites/all/modules/commerce_webform/commerce_webform.module).

Can anyone confirm this is still a fault with latest dev branch and what factors cause it to appear? For example, multiple, list box etc.

Kind regards,

John

tevih’s picture

I've updated to latest version of webform, and latest dev release is completely broken - won't kick me off to the cart; nothing in the cart. Latest stable release still causes the error (without the patch above) even on a single list of products (select with a radio button).

PipB’s picture

I got error: drupal Notice: Trying to get property of non-object in commerce_webform_update_webform_submission_productfield() (line 338 etc.
and solved it with 2 patches: one on this page #3 and the patch at the end of page: http://drupal.org/node/1763000 > http://drupal.org/files/commerce_webform-checking_if_product_id_is_set-1...
You can find them here: they need to be reviewed: http://drupal.org/project/issues/search/commerce_webform?status[]=8&stat...

johnennew’s picture

Status: Needs work » Fixed

Hi all,

Apologies for the slow response. It seems there are breaking api changes between webform 7.x-3.x branch (recommended and stable release) and 7.x-4.x (latest dev and definitely alpha release) of webform.

To address this I have created a new branch of commerce_webform, 7.x-2.x which is compatible with the 7.x-4.x branch of webform.

Please download the latest 2.x version - this will remain alpha whilst webform 4.x is in alpha.

Thanks for your patience.

Issue with webform 4.x replicated and patch in #3 applied with attribution applied.

Status: Fixed » Closed (fixed)

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

kenorb’s picture

Issue summary: View changes

Thanks, patch #3 works for 7.x-1.0-beta6.