Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Column 'order_Id' Cannot Be Null (1048) Rate Topic   - - - - -

 
  • buging
  • Member
  • Members
  • Join Date: 12-Jan 11
  • 332 posts

Posted 02 August 2016 - 02:00 PM #1

Hello

I was hoping someone can help with this error. I'm using multi vendor 4.3.9 and I get this when someone logs into the store. I also tried adding a column named order_id and making sure it's not set to NULL but still no go

Column 'order_id' cannot be null (1048)

REPLACE INTO cscart_user_session_products (`user_id`, `timestamp`, `type`, `user_type`, `item_id`, `item_type`, `product_id`, `amount`, `price`, `session_id`, `ip_address`, `order_id`, `extra`) VALUES (7, 1470145263, 'C', 'R', 2219528071, 'P', 2261, 1, 315, '0cf7935c3d379449c39e488db1b9c37c-C', '319651a7', NULL, 'a:32:{s:7:\"user_id\";s:1:\"7\";s:9:\"timestamp\";s:10:\"1467552428\";s:4:\"type\";s:1:\"C\";s:9:\"user_type\";s:1:\"R\";s:7:\"item_id\";s:10:\"2219528071\";s:9:\"item_type\";s:1:\"P\";s:10:\"product_id\";i:2261;s:6:\"amount\";i:1;s:5:\"price\";d:315;s:10:\"session_id\";s:34:\"289a323488c0579e55a54a973cc8f63f-C\";s:10:\"ip_address\";s:8:\"31965798\";s:8:\"order_id\";N;s:12:\"product_code\";s:12:\"BKEX0200-E6L\";s:7:\"product\";s:24:\"Tim Burton Playing Cards\";s:15:\"product_options\";a:0:{}s:12:\"stored_price\";s:1:\"N\";s:9:\"main_pair\";a:5:{s:7:\"pair_id\";s:4:\"3168\";s:8:\"image_id\";s:1:\"0\";s:11:\"detailed_id\";s:4:\"3200\";s:8:\"position\";s:1:\"0\";s:8:\"detailed\";a:10:{s:9:\"object_id\";s:4:\"2261\";s:11:\"object_type\";s:7:\"product\";s:10:\"image_path\";s:59:\"http://www.blink.com...lt\";s:24:\"TimBurton Playing Cards\";s:7:\"image_x\";s:3:\"560\";s:7:\"image_y\";s:3:\"400\";s:15:\"http_image_path\";s:59:\"http://www.blink.com.ph/images/detailed/3/9781596177376.jpg\";s:16:\"https_image_path\";s:60:\"https://www.blink.com.ph/images/detailed/3/9781596177376.jpg\";s:13:\"absolute_path\";s:73:\"/var/www/vhosts/blink.com.ph/httpdocs/images/detailed/3/9781596177376.jpg\";s:13:\"relative_path\";s:28:\"detailed/3/9781596177376.jpg\";}}s:5:\"extra\";a:3:{s:15:\"product_options\";a:0:{}s:18:\"unlimited_download\";s:1:\"N\";s:13:\"return_period\";s:2:\"10\";}s:15:\"stored_discount\";s:1:\"N\";s:10:\"company_id\";s:1:\"2\";s:13:\"return_period\";s:2:\"10\";s:12:\"amount_total\";i:1;s:12:\"options_type\";s:1:\"P\";s:15:\"exceptions_type\";s:1:\"F\";s:15:\"modifiers_price\";d:0;s:6:\"is_edp\";s:1:\"N\";s:12:\"edp_shipping\";s:1:\"N\";s:8:\"discount\";i:0;s:10:\"promotions\";a:0:{}s:10:\"base_price\";d:315;s:12:\"category_ids\";a:5:{i:0;i:555;i:1;i:99;i:2;i:180;i:3;i:483;i:4;i:585;}s:13:\"display_price\";d:315;}')

 

Error at

app/Tygh/Database/Connection.php, line: 863

Backtrace File: app/Tygh/Database/Connection.php Line: 458 Function: error File: app/functions/fn.database.php Line: 129 Function: query File: app/functions/fn.cart.php Line: 1552 Function: db_query File: app/functions/fn.users.php Line: 2974 Function: fn_save_cart_content File: app/controllers/common/auth.php Line: 177 Function: fn_user_logout File: app/functions/fn.control.php Line: 699 Function: include File: app/functions/fn.control.php Line: 455 Function: fn_run_controller File: index.php Line: 25 Function: fn_dispatch

 



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19063 posts

Posted 02 August 2016 - 02:07 PM #2

Please make sure that the order_id columns has the mediumint(8) DEFAULT NULL parameters

 

http://prntscr.com/c0o9aw


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • buging
  • Member
  • Members
  • Join Date: 12-Jan 11
  • 332 posts

Posted 02 August 2016 - 02:18 PM #3

Please make sure that the order_id columns has the mediumint( 8) DEFAULT NULL parameters

 

http://prntscr.com/c0o9aw

thanks eComLabs. I actually did. Here's what i have http://prntscr.com/c0oedl



 
  • buging
  • Member
  • Members
  • Join Date: 12-Jan 11
  • 332 posts

Posted 02 August 2016 - 02:40 PM #4

its working fine now. Sorry i took screenshot of the wrong DB. Made it NULL and issue disappeared. thanks



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19063 posts

Posted 03 August 2016 - 06:47 AM #5

Glad to hear that the issue is solved


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • buging
  • Member
  • Members
  • Join Date: 12-Jan 11
  • 332 posts

Posted 19 September 2016 - 12:27 AM #6

this problem occurred again. I was able to fix it by changing to NULL be default again. Any idea was is causing this to change?

 

thanks in advance.



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19063 posts

Posted 20 September 2016 - 08:15 AM #7

this problem occurred again. I was able to fix it by changing to NULL be default again. Any idea was is causing this to change?

 

thanks in advance.

 

Please check last comment here:

 

http://forum.cs-cart...-be-null-b1048b


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.