I've been forcing my way through a few issues with the latest git version (which is the same as the dev release I think). After submitting the form /node/3/done?sid=1 I get these series of notices:

Notice: Undefined offset: -1 in uc_webform_webform_client_form_submit() (line 294 of /home/dm7/sites/all/modules/contrib/uc_webform/uc_webform.module).
Notice: Trying to get property of non-object in uc_webform_webform_client_form_submit() (line 294 of /home/dm7/sites/all/modules/contrib/uc_webform/uc_webform.module).
Notice: Trying to get property of non-object in uc_webform_webform_client_form_submit() (line 296 of /home/dm7/sites/all/modules/contrib/uc_webform/uc_webform.module).
Notice: Trying to get property of non-object in uc_cart_add_item() (line 1123 of /home/dm7/sites/all/modules/contrib/ubercart/uc_cart/uc_cart.module).
Notice: Undefined variable: type in uc_product_is_product() (line 1270 of /home/dm7/sites/all/modules/contrib/ubercart/uc_product/uc_product.module).
Notice: Trying to get property of non-object in uc_cart_add_item() (line 1124 of /home/dm7/sites/all/modules/contrib/ubercart/uc_cart/uc_cart.module).
is not a product. Unable to add to cart.
Notice: Trying to get property of non-object in uc_webform_webform_client_form_submit() (line 300 of /home/dm7/sites/all/modules/contrib/uc_webform/uc_webform.module).
Notice: Trying to get property of non-object in uc_webform_webform_client_form_submit() (line 301 of /home/dm7/sites/all/modules/contrib/uc_webform/uc_webform.module).

Now the numbers might be a bit different (and I can send a patch against git that will bring it up to where I am), but seems it's not happy with uc_webform_webform_client_form_submit(). I can get rid of the undefined offset I think using:

       $count_items = count($items) - 1;
       if ($count_items >= 0) {
       variable_set('uc_webform_cart_item_' . $items[$count_items]->cart_item_id . '_' . $cid, $form_state['values']['details']['sid'] );
       }

But not sure why $items are 0 after I've submitted a survey anyways.

I haven't begun digging into the errors related to uc_product.module & uc_cart.module.

Not sure if just defining it as a product, makes it a product:
$product = node_load($uc_webform->nid);

The call to uc_cart_get_contents() is missing variables but that shouldn't matter for anything but performance.

I'll look into this again later on today.

Comments

Kojo Unsui’s picture

I followed exactly the same way... and blocked at the same point. Thanks for the first patch at #3.

But it sounds more complicated now. Anything new ? I'm desperately interested in that project as I was blocked with projects with similar purposes, usually because not ported to D7 (i.e uc signup).

Any help is really appreciated !

mgifford’s picture

See the patch that we provided here http://drupal.org/node/1255832#comment-6008910

I'm not sure that the official D7 release works, but the patch (above) based on the Drupal 6 version does.

mgifford’s picture

@Thierry_R did you have any luck with the patch I provided?

deja711’s picture

Status: Active » Closed (won't fix)

This should not be an issue in 7.x-2.x branch. Note 7.x-1-x branch is not supported and was one of initial (abandoned) attempts for porting this module from Drupal 6.
If this is an issue with 7.x-2.x please reopen the issue.