Crazy amount of errors

Posts: 2
Joined: 09/22/2007

Updated to 7c and now getting a vast amount of errors on all ubercart pages.
E.g. from the /products listing page:

    * 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_23' was given in /home/sandford/public_html/includes/form.inc on line 217.
    * warning: Invalid argument supplied for foreach() in /home/sandford/public_html/modules/node/node.module on line 521.
    * warning: implode() [function.implode]: Bad arguments. in /home/sandford/public_html/modules/node/node.module on line 525.
    * user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 query: SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, n.comment, n.promote, n.sticky, r.timestamp AS revision_timestamp, r.title, r.body, r.teaser, r.log, r.format, u.uid, u.name, u.picture, u.data FROM node n INNER JOIN users u ON u.uid = n.uid INNER JOIN node_revisions r ON r.vid = n.vid WHERE in /home/sandford/public_html/includes/database.mysql.inc on line 172.
    * 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_12' was given in /home/sandford/public_html/includes/form.inc on line 217.
    * warning: Invalid argument supplied for foreach() in /home/sandford/public_html/modules/node/node.module on line 521.
    * warning: implode() [function.implode]: Bad arguments. in /home/sandford/public_html/modules/node/node.module on line 525.
    * user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 query: SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, n.comment, n.promote, n.sticky, r.timestamp AS revision_timestamp, r.title, r.body, r.teaser, r.log, r.format, u.uid, u.name, u.picture, u.data FROM node n INNER JOIN users u ON u.uid = n.uid INNER JOIN node_revisions r ON r.vid = n.vid WHERE in /home/sandford/public_html/includes/database.mysql.inc on line 172.
    * 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_10' was given in /home/sandford/public_html/includes/form.inc on line 217.
    * warning: Invalid argument supplied for foreach() in /home/sandford/public_html/modules/node/node.module on line 521.
    * warning: implode() [function.implode]: Bad arguments. in /home/sandford/public_html/modules/node/node.module on line 525.
    * user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 query: SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, n.comment, n.promote, n.sticky, r.timestamp AS revision_timestamp, r.title, r.body, r.teaser, r.log, r.format, u.uid, u.name, u.picture, u.data FROM node n INNER JOIN users u ON u.uid = n.uid INNER JOIN node_revisions r ON r.vid = n.vid WHERE in /home/sandford/public_html/includes/database.mysql.inc on line 172.
    * 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_11' was given in /home/sandford/public_html/includes/form.inc on line 217.
    * warning: Invalid argument supplied for foreach() in /home/sandford/public_html/modules/node/node.module on line 521.
    * warning: implode() [function.implode]: Bad arguments. in /home/sandford/public_html/modules/node/node.module on line 525.
    * user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 query: SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, n.comment, n.promote, n.sticky, r.timestamp AS revision_timestamp, r.title, r.body, r.teaser, r.log, r.format, u.uid, u.name, u.picture, u.data FROM node n INNER JOIN users u ON u.uid = n.uid INNER JOIN node_revisions r ON r.vid = n.vid WHERE in /home/sandford/public_html/includes/database.mysql.inc on line 172.
    * 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_13' was given in /home/sandford/public_html/includes/form.inc on line 217.
    * warning: Invalid argument supplied for foreach() in /home/sandford/public_html/modules/node/node.module on line 521.
    * warning: implode() [function.implode]: Bad arguments. in /home/sandford/public_html/modules/node/node.module on line 525.
    * user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 query: SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, n.comment, n.promote, n.sticky, r.timestamp AS revision_timestamp, r.title, r.body, r.teaser, r.log, r.format, u.uid, u.name, u.picture, u.data FROM node n INNER JOIN users u ON u.uid = n.uid INNER JOIN node_revisions r ON r.vid = n.vid WHERE in /home/sandford/public_html/includes/database.mysql.inc on line 172.

Has ubercart missed a database update at some stage?

UPDATE: No idea what this was all about. I scratched my head for days. What with all my previous imagecache problems I figured that somewhere along the stage an update script hadnt worked. I took the desperate solution of rebuilding the entire site from a fresh drupal/ubercart build.

Posts: 55
Joined: 10/08/2007
Getting busy with the Ubercode.

Something very similar is happening to our site. Just installed and configured ubercart, then added products.

Here is the URL: http://leastlikely2breed.net/backroom

One thing I know I did was leave items in the cart placed there through a kit, then deleted the kit before removing from the cart.

HOWEVER, now i can't remove them. Their images don't show - the Qty field is blank. And the reason I'm posting here is I too now see a crazy amount of errors that won't go away. It's very disconcerting. For the sake of thoroughness (hopefully leading to a quick solution), here are the errors below:

    * warning: Division by zero in /home/breed/public_html/backroom/modules/ubercart/uc_product_kit/uc_product_kit.module on line 474.
    * warning: Invalid argument supplied for foreach() in /home/breed/public_html/backroom/modules/ubercart/uc_product_kit/uc_product_kit.module on line 494.
    * warning: Division by zero in /home/breed/public_html/backroom/modules/ubercart/uc_product_kit/uc_product_kit.module on line 474.
    * warning: Invalid argument supplied for foreach() in /home/breed/public_html/backroom/modules/ubercart/uc_product_kit/uc_product_kit.module on line 494.
    * warning: Division by zero in /home/breed/public_html/backroom/modules/ubercart/uc_product_kit/uc_product_kit.module on line 474.
    * warning: Invalid argument supplied for foreach() in /home/breed/public_html/backroom/modules/ubercart/uc_product_kit/uc_product_kit.module on line 494.
    * warning: Invalid argument supplied for foreach() in /home/breed/public_html/backroom/modules/node/node.module on line 504.
    * warning: implode() [function.implode]: Bad arguments. in /home/breed/public_html/backroom/modules/node/node.module on line 508.
    * user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 query: SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, n.comment, n.promote, n.sticky, r.timestamp AS revision_timestamp, r.title, r.body, r.teaser, r.log, r.format, u.uid, u.name, u.picture, u.data FROM node n INNER JOIN users u ON u.uid = n.uid INNER JOIN node_revisions r ON r.vid = n.vid WHERE in /home/breed/public_html/backroom/includes/database.mysql.inc on line 172.
    * warning: Invalid argument supplied for foreach() in /home/breed/public_html/backroom/modules/node/node.module on line 504.
    * warning: implode() [function.implode]: Bad arguments. in /home/breed/public_html/backroom/modules/node/node.module on line 508.
    * user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 query: SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, n.comment, n.promote, n.sticky, r.timestamp AS revision_timestamp, r.title, r.body, r.teaser, r.log, r.format, u.uid, u.name, u.picture, u.data FROM node n INNER JOIN users u ON u.uid = n.uid INNER JOIN node_revisions r ON r.vid = n.vid WHERE in /home/breed/public_html/backroom/includes/database.mysql.inc on line 172.
    * warning: Invalid argument supplied for foreach() in /home/breed/public_html/backroom/modules/node/node.module on line 504.
    * warning: implode() [function.implode]: Bad arguments. in /home/breed/public_html/backroom/modules/node/node.module on line 508.
    * user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 query: SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, n.comment, n.promote, n.sticky, r.timestamp AS revision_timestamp, r.title, r.body, r.teaser, r.log, r.format, u.uid, u.name, u.picture, u.data FROM node n INNER JOIN users u ON u.uid = n.uid INNER JOIN node_revisions r ON r.vid = n.vid WHERE in /home/breed/public_html/backroom/includes/database.mysql.inc on line 172.

Posts: 5617
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Just go into your database and empty out/truncate the uc_cart_products table. That'll empty the cart quick and dirty. Eye-wink

Posts: 55
Joined: 10/08/2007
Getting busy with the Ubercode.

Oh - I should have waited! I ended up deleting the actual products, and then just re-installing them! oh well... but i have two other problems that are more serious, so I will hope this solved it for now, and perhaps this can be regarded as a known issue for you guys... that if a kit is deleted, while still in the cart, then it's children will become orphaned in cart purgatory...
thanks -- (I'm still waiting for help with one of my other issues though >:)

Posts: 2349
Joined: 08/07/2007
AdministratoreLiTe!

OK, I've put in some functions in uc_cart and uc_product_kit to handle the products in the cart when nodes are deleted. Product kits were especially tricky because the node id of the kit is stored in the serialized data array.

I also don't know what to do when a product is deleted, and a kit that contains it is in someone's cart. If the immutable kit setting is enabled, the rest of the product kit should be removed as well. Sad

Lesson to learn: don't delete products without emptying out the carts first.

Posts: 10
Joined: 12/20/2007

I'm still getting this error; more specifically when anonymous goes to checkout.

I've tried clearing out the uc_cart_products -- no luck.

Is there a solution, or better yet, a way to disable errors like this so that customers don't see it?

Posts: 10
Joined: 12/20/2007

Again with the errors! Sad

    * warning: Invalid argument supplied for foreach() in /home/killerje/public_html/modules/node/node.module on line 561.
    * warning: implode() [function.implode]: Invalid arguments passed in /home/killerje/public_html/modules/node/node.module on line 565.
    * user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 query: SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, n.comment, n.promote, n.sticky, r.timestamp AS revision_timestamp, r.title, r.body, r.teaser, r.log, r.format, u.uid, u.name, u.picture, u.data FROM node n INNER JOIN users u ON u.uid = n.uid INNER JOIN node_revisions r ON r.vid = n.vid WHERE in /home/killerje/public_html/includes/database.mysql.inc on line 172.
    * warning: Invalid argument supplied for foreach() in /home/killerje/public_html/modules/node/node.module on line 561.
    * warning: implode() [function.implode]: Invalid arguments passed in /home/killerje/public_html/modules/node/node.module on line 565.
    * user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 query: SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, n.comment, n.promote, n.sticky, r.timestamp AS revision_timestamp, r.title, r.body, r.teaser, r.log, r.format, u.uid, u.name, u.picture, u.data FROM node n INNER JOIN users u ON u.uid = n.uid INNER JOIN node_revisions r ON r.vid = n.vid WHERE in /home/killerje/public_html/includes/database.mysql.inc on line 172.
    * warning: Invalid argument supplied for foreach() in /home/killerje/public_html/modules/node/node.module on line 561.
    * warning: implode() [function.implode]: Invalid arguments passed in /home/killerje/public_html/modules/node/node.module on line 565.
    * user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 query: SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, n.comment, n.promote, n.sticky, r.timestamp AS revision_timestamp, r.title, r.body, r.teaser, r.log, r.format, u.uid, u.name, u.picture, u.data FROM node n INNER JOIN users u ON u.uid = n.uid INNER JOIN node_revisions r ON r.vid = n.vid WHERE in /home/killerje/public_html/includes/database.mysql.inc on line 172.
    * warning: Invalid argument supplied for foreach() in /home/killerje/public_html/modules/node/node.module on line 561.
    * warning: implode() [function.implode]: Invalid arguments passed in /home/killerje/public_html/modules/node/node.module on line 565.
    * user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 query: SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, n.comment, n.promote, n.sticky, r.timestamp AS revision_timestamp, r.title, r.body, r.teaser, r.log, r.format, u.uid, u.name, u.picture, u.data FROM node n INNER JOIN users u ON u.uid = n.uid INNER JOIN node_revisions r ON r.vid = n.vid WHERE in /home/killerje/public_html/includes/database.mysql.inc on line 172.
    * warning: Invalid argument supplied for foreach() in /home/killerje/public_html/modules/node/node.module on line 561.
    * warning: implode() [function.implode]: Invalid arguments passed in /home/killerje/public_html/modules/node/node.module on line 565.
    * user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 query: SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, n.comment, n.promote, n.sticky, r.timestamp AS revision_timestamp, r.title, r.body, r.teaser, r.log, r.format, u.uid, u.name, u.picture, u.data FROM node n INNER JOIN users u ON u.uid = n.uid INNER JOIN node_revisions r ON r.vid = n.vid WHERE in /home/killerje/public_html/includes/database.mysql.inc on line 172.
    * warning: Invalid argument supplied for foreach() in /home/killerje/public_html/modules/node/node.module on line 561.
    * warning: implode() [function.implode]: Invalid arguments passed in /home/killerje/public_html/modules/node/node.module on line 565.
    * user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 query: SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, n.comment, n.promote, n.sticky, r.timestamp AS revision_timestamp, r.title, r.body, r.teaser, r.log, r.format, u.uid, u.name, u.picture, u.data FROM node n INNER JOIN users u ON u.uid = n.uid INNER JOIN node_revisions r ON r.vid = n.vid WHERE in /home/killerje/public_html/includes/database.mysql.inc on line 172.

I don't really understand most of it, it doesn't seem like a huge deal as the site still works regardless. Maybe there's a way to disable these errors? It looks unprofessional, though.