Great module really cool!!

Ran into issue after installing the latest version as still getting the following error:

warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'uc_catalog_buy_it_now_form_41' was given in /siteroot/public_html/site/includes/form.inc on line 366.

Any ideas of suggestions?

Thank you,

Comments

tominglis’s picture

I have Drupal 6.9, with the following modules:

ACL / Content Access, Adsense, Captcha, Event / Signup, Image, Nice Menus, Profile Privacy, Tac Lite, Ubercart / Donation Products / VAT Number, Views, Weather

When I click on a catalog category containing a donation product I get a warning message at the top for each donation, and they have no 'Add to cart' button:

warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'uc_product_add_to_cart_form_365' was given in /home/standrew/public_html/includes/form.inc on line 366.

If I click on a donation, I can edit the amount and add it to the cart, but I get two instances of the following warning:

warning: Invalid argument supplied for foreach() in /home/standrew/public_html/sites/all/modules/ubercart/uc_donation/uc_donation.module on line 540.
warning: Invalid argument supplied for foreach() in /home/standrew/public_html/sites/all/modules/ubercart/uc_donation/uc_donation.module on line 540.

These also appear when viewing the Shopping cart:

warning: Invalid argument supplied for foreach() in /home/standrew/public_html/sites/all/modules/ubercart/uc_donation/uc_donation.module on line 540.
warning: Invalid argument supplied for foreach() in /home/standrew/public_html/sites/all/modules/ubercart/uc_donation/uc_donation.module on line 540.

If I try to remove it from the cart, it works, but I get one instance of the warning:

warning: Invalid argument supplied for foreach() in /home/standrew/public_html/sites/all/modules/ubercart/uc_donation/uc_donation.module on line 540.

Changing the amount in the cart adds an additional warning to those already there:

warning: Invalid argument supplied for foreach() in /home/standrew/public_html/sites/all/modules/ubercart/uc_donation/uc_donation.module on line 540.

I get the same two warnings on each page of checkout:

warning: Invalid argument supplied for foreach() in /home/standrew/public_html/sites/all/modules/ubercart/uc_donation/uc_donation.module on line 540.
warning: Invalid argument supplied for foreach() in /home/standrew/public_html/sites/all/modules/ubercart/uc_donation/uc_donation.module on line 540.

tominglis’s picture

It is also not possible to now create a donation product that is assigned to a vocabulary term within the catalogue, nor to edit those products that were already configured in this way.

bunger’s picture

I am also seeing this same issue and it's a show stopper...

WebbyWorker’s picture

Here is the fix for part of the problem wiht uc_donations

Seem to work for us.

http://drupal.org/node/341819

--- uc_product/uc_product.module (saved version)
+++ (current document)
@@ -399,7 +399,7 @@
$products = db_query("SELECT DISTINCT nid, type FROM {node} WHERE nid = %d", $args[0]->nid);

while ($product = db_fetch_object($products)) {
- if (in_array($product->type, array_keys(uc_product_node_info()))) {
+ if (in_array($product->type, module_invoke_all('product_types'))) {
$forms['uc_product_add_to_cart_form_'. $product->nid] = array('callback' => 'uc_product_add_to_cart_form');
$forms['uc_catalog_buy_it_now_form_'. $product->nid] = array('callback' => 'uc_catalog_buy_it_now_form');
}

greenskin’s picture

Status: Active » Fixed

This should not be a problem anymore. A work around has been made and committed to today's dev release.

Status: Fixed » Closed (fixed)

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