Guest Posted January 21, 2009 Share Posted January 21, 2009 Over the last week we started seeing some strange error messages on our website. The first error we got last week was -- 1364 - Field 'customers_gender' doesn't have a default value -- which I was able to fix this by turning on the gender option during account creation. In the last day or so we're now seeing the same types of errors when an order is placed. We have not changed anything on the site or in the db within the last month. I have contacted my host company and they are looking at this, but they don't think it has anything to do with them. However, I do have a dev. site hosted by the same company which is rarely used but is returning the same error message. Has anyone else encountered this or do you have any ideas? Currently, the site is up so we can continue testing, but no new accounts can be created and any orders by existing customers are blank w/ only the payment going through via paypal (in these cases we have had to call the customer and find out what exactly they ordered). Thanks in advance for your help! David Link to comment Share on other sites More sharing options...
roya.k Posted January 21, 2009 Share Posted January 21, 2009 In my opinion (and it's just an opinion, I'm not sure, to be confirmed by other community members) you have a MySQL 5 running in strict mode, and you (or your host company) need to turn it off. Open source n'est pas un échange à sens unique ... La plupart du temps un simple merci ou quelques mots d'encouragement suffisent... Link to comment Share on other sites More sharing options...
Guest Posted January 22, 2009 Share Posted January 22, 2009 In my opinion (and it's just an opinion, I'm not sure, to be confirmed by other community members) you have a MySQL 5 running in strict mode, and you (or your host company) need to turn it off. Thanks for the suggestion, I've forwarded it to my host and am waiting on a reply. In the meantime - does anyone else have any ideas or maybe confirm what roya.k has suggested? Thanks for all you help! David Link to comment Share on other sites More sharing options...
Jan Zonjee Posted January 22, 2009 Share Posted January 22, 2009 In the meantime - does anyone else have any ideas or maybe confirm what roya.k has suggested? roya.k is probably right in my opinion. I vaguely recall that using '' instead of null would cause that error (osC uses/used the two single quotes in a lot of places where null could be used). However, I do think you are not telling us everything (like having installed Purchase Without Account?) because I don't see why ordering should throw an error like that. The order processing does not write information to the table customers. Link to comment Share on other sites More sharing options...
Guest Posted January 22, 2009 Share Posted January 22, 2009 However, I do think you are not telling us everything (like having installed Purchase Without Account?) because I don't see why ordering should throw an error like that. The order processing does not write information to the table customers. You are correct, we have the points and rewards module installed (which has worked perfectly for the last several months), and when a repeat customer places an order they get this error message--- 1048 - Column 'customers_shopping_points' cannot be null update customers set customers_shopping_points = null, customers_points_expires = null where customers_id = '8' limit 1 [TEP STOP] --- in this case, the payment does go thru via paypal, but the their is no record of the items ordered and the points are not deducted from the customers account. Thanks again, for all your help! David Link to comment Share on other sites More sharing options...
Jan Zonjee Posted January 22, 2009 Share Posted January 22, 2009 You are correct, we have the points and rewards module installed (which has worked perfectly for the last several months), and when a repeat customer places an order they get this error message---1048 - Column 'customers_shopping_points' cannot be null update customers set customers_shopping_points = null, customers_points_expires = null where customers_id = '8' limit 1 [TEP STOP] --- in this case, the payment does go thru via paypal, but the their is no record of the items ordered and the points are not deducted from the customers account. That looks like an incorrect sql command then. If the column customers_shopping_points is an integer and not nullable you cannot put a null in it (mySQL might have done that for you in the non-strict operating). If that column is supposed to be an integer the points should be casted an integer (int) before trying to add it to the database (so null becomes 0). So check the type of that column, find the offending query and fix it if applicable (probably good to add it to the contribution too). Link to comment Share on other sites More sharing options...
Mr.JTX Posted February 8, 2009 Share Posted February 8, 2009 That looks like an incorrect sql command then. If the column customers_shopping_points is an integer and not nullable you cannot put a null in it (mySQL might have done that for you in the non-strict operating). If that column is supposed to be an integer the points should be casted an integer (int) before trying to add it to the database (so null becomes 0).So check the type of that column, find the offending query and fix it if applicable (probably good to add it to the contribution too). I am getting the same error 1048 - Column 'customers_shopping_points' cannot be null update customers set customers_shopping_points = null, customers_points_expires = null where customers_id = '2' limit 1 [TEP STOP] in this case, the payment goes through bank transfer (money order), their is no record of the items ordered and the points are not deducted from the customers account. Where can I find the customers_shopping_points table in my database ? It seems it doesnt exist because i cant see it ? here is how my database looks like Tabel Actie Records1 Type Collatie Grootte Overhead address_book 2 MyISAM latin1_swedish_ci 3,3 KB 116 Bytes address_format 5 MyISAM latin1_swedish_ci 2,5 KB - administrators 1 MyISAM latin1_swedish_ci 2,0 KB - am_attributes_to_templates 0 MyISAM latin1_swedish_ci 1,0 KB - am_templates 0 MyISAM latin1_swedish_ci 1,0 KB - banners 1 MyISAM latin1_swedish_ci 3,1 KB - banners_history 1 MyISAM latin1_swedish_ci 3,0 KB - cache 6 MyISAM latin1_swedish_ci 7,8 KB - categories 21 MyISAM latin1_swedish_ci 4,0 KB - categories_description 84 MyISAM latin1_swedish_ci 7,0 KB - configuration 271 MyISAM latin1_swedish_ci 48,2 KB 40 Bytes configuration_group 19 MyISAM latin1_swedish_ci 3,1 KB - counter 1 MyISAM latin1_swedish_ci 1,0 KB - counter_history 0 MyISAM latin1_swedish_ci 1,0 KB - countries 239 MyISAM latin1_swedish_ci 18,1 KB - currencies 2 MyISAM latin1_swedish_ci 3,1 KB - customers 2 MyISAM latin1_swedish_ci 3,3 KB 124 Bytes customers_basket 2 MyISAM latin1_swedish_ci 3,1 KB - customers_basket_attributes 0 MyISAM latin1_swedish_ci 3,1 KB 64 Bytes customers_info 2 MyISAM latin1_swedish_ci 2,1 KB 37 Bytes customers_points_pending 10 MyISAM latin1_swedish_ci 2,9 KB 212 Bytes geo_zones 3 MyISAM latin1_swedish_ci 2,1 KB - languages 4 MyISAM latin1_swedish_ci 3,2 KB - manufacturers 9 MyISAM latin1_swedish_ci 3,5 KB - manufacturers_info 36 MyISAM latin1_swedish_ci 3,3 KB - newsletters 0 MyISAM latin1_swedish_ci 1,0 KB - orders 8 MyISAM latin1_swedish_ci 8,0 KB 1,0 KB orders_products 1 MyISAM latin1_swedish_ci 4,3 KB 244 Bytes orders_products_attributes 0 MyISAM latin1_swedish_ci 3,1 KB 72 Bytes orders_products_download 0 MyISAM latin1_swedish_ci 1,0 KB - orders_status 44 MyISAM latin1_swedish_ci 4,2 KB - orders_status_history 1 MyISAM latin1_swedish_ci 3,2 KB 116 Bytes orders_total 38 MyISAM latin1_swedish_ci 6,5 KB 616 Bytes products 29 MyISAM latin1_swedish_ci 6,1 KB - products_attributes 13 MyISAM latin1_swedish_ci 3,4 KB - products_attributes_download 1 MyISAM latin1_swedish_ci 2,0 KB - products_description 116 MyISAM latin1_swedish_ci 81,3 KB - products_notifications 0 MyISAM latin1_swedish_ci 1,0 KB - products_options 20 MyISAM latin1_swedish_ci 2,4 KB - products_options_values 44 MyISAM latin1_swedish_ci 3,0 KB - products_options_values_to_products_options 11 MyISAM latin1_swedish_ci 2,1 KB - products_to_categories 29 MyISAM latin1_swedish_ci 2,3 KB - reviews 1 MyISAM latin1_swedish_ci 4,0 KB - reviews_description 1 MyISAM latin1_swedish_ci 2,1 KB - sessions 3 MyISAM latin1_swedish_ci 4,4 KB 100 Bytes specials 4 MyISAM latin1_swedish_ci 3,2 KB - table_invoice 3 MyISAM latin1_swedish_ci 2,1 KB - tax_class 3 MyISAM latin1_swedish_ci 2,1 KB - tax_rates 3 MyISAM latin1_swedish_ci 2,1 KB - whos_online 1 MyISAM latin1_swedish_ci 1,3 KB 116 Bytes zones 181 MyISAM latin1_swedish_ci 12,0 KB - zones_to_geo_zones 238 MyISAM latin1_swedish_ci 16,7 KB - 53 tabel(len) Som 1,514 MyISAM latin1_swedish_ci 321,7 KB 2,8 KB please help thx. Link to comment Share on other sites More sharing options...
MyR Posted February 22, 2010 Share Posted February 22, 2010 I am getting the same error 1048 - Column 'customers_shopping_points' cannot be null update customers set customers_shopping_points = null, customers_points_expires = null where customers_id = '2' limit 1 [TEP STOP] in this case, the payment goes through bank transfer (money order), their is no record of the items ordered and the points are not deducted from the customers account. Where can I find the customers_shopping_points table in my database ? It seems it doesnt exist because i cant see it ? here is how my database looks like please help thx. In case anyone else comes across this, line 207 in redemptions.php needs to read: tep_db_query("update " . TABLE_CUSTOMERS . " set customers_shopping_points = 0, customers_points_expires = null where customers_id = '". (int)$customer_id ."' limit 1"); enjoy! I don't have enough free time to update the package. Link to comment Share on other sites More sharing options...
jacarrasquel Posted May 21, 2010 Share Posted May 21, 2010 In case anyone else comes across this, line 207 in redemptions.php needs to read: tep_db_query("update " . TABLE_CUSTOMERS . " set customers_shopping_points = 0, customers_points_expires = null where customers_id = '". (int)$customer_id ."' limit 1"); enjoy! I don't have enough free time to update the package. Thank, whit your help I solved this error/ 1048 - La columna 'customers_shopping_points' no puede ser nula update customers set customers_shopping_points = null, customers_points_expires = null where customers_id = '57' limit 1 Buen aporte Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.