To rebuild the bug:
- 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)
- Create a webform and set a type of "Commerce product skus" components;
- fill the webform and click the "add to cart" button, the php error comes out.
The error screenshot is attached as follows.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | order-error-1709876-3.patch | 1.02 KB | skyredwang |
| #2 | order-error-1709876-2.patch | 726 bytes | skyredwang |
| php_error.png | 25.61 KB | willkaxu |
Comments
Comment #1
tevih commentedMe 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.
Comment #2
skyredwangSimple fix
Comment #3
skyredwangA new patch with metadata
Comment #4
Jabbtech commentedthanks!
Comment #5
johnennew commentedThanks all for the bug report and patch. Patch in #3 committed to development branch and will appear in the next release.
Comment #6
johnennew commentedJumped 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
Comment #7
tevih commentedI'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).
Comment #8
PipB commentedI 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...
Comment #9
johnennew commentedHi 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.
Comment #11
kenorb commentedThanks, patch #3 works for 7.x-1.0-beta6.