News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Solved - vmError: TableOrders::store fail - and - couldn't create order

Started by singletrack, January 05, 2015, 22:09:22 PM

Previous topic - Next topic

singletrack

Hello,

I have virtuemart 2.6.14 running on joomla 2.5.24

I have several problems, and I am really in need of quick help!
I was making a test order when the following message came up:
QuoteCouldn't create order No order created
-  and true, there was no order in backend as well. I tried repairing the tables through virtuemart admin as suggested in other threads, but I always get the same message:

QuotealterTable CHANGE lyzge_virtuemart_customs.custom_params : ALTER TABLE `lyzge_virtuemart_customs` CHANGE COLUMN `custom_params` `custom_params` TEXT NOT NULL DEFAULT ''
alterTable CHANGE lyzge_virtuemart_medias.file_params : ALTER TABLE `lyzge_virtuemart_medias` CHANGE COLUMN `file_params` `file_params` VARCHAR(17500) NOT NULL DEFAULT ''
alterTable CHANGE lyzge_virtuemart_shoppergroups.price_display : ALTER TABLE `lyzge_virtuemart_shoppergroups` CHANGE COLUMN `price_display` `price_display` BLOB NOT NULL DEFAULT ''
Table updated: Tablename lyzge_virtuemart_customs dropped: 0 altered: 1 added: 0
Table updated: Tablename lyzge_virtuemart_medias dropped: 0 altered: 1 added: 0
Table updated: Tablename lyzge_virtuemart_shoppergroups dropped: 0 altered: 1 added: 0
Database updated

I also noticed the following errors in the log file:

Quote
2015-01-05 20:49:03 ERROR vmError: TableOrders::store failed - Duplicate entry '4294967295' for key 'PRIMARY' SQL=INSERT INTO `lyzge_virtuemart_orders` (`virtuemart_order_id`,`virtuemart_user_id`,`virtuemart_vendor_id`,`order_number`,`order_pass`,`customer_number`,`order_total`,`order_salesPrice`,`order_billTaxAmount`,`order_billTax`,`order_billDiscountAmount`,`order_discountAmount`,`order_subtotal`,`order_tax`,`order_shipment`,`order_shipment_tax`,`order_payment`,`order_payment_tax`,`coupon_discount`,`order_discount`,`order_currency`,`order_status`,`user_currency_id`,`user_currency_rate`,`virtuemart_paymentmethod_id`,`virtuemart_shipmentmethod_id`,`customer_note`,`ip_address`,`order_language`,`created_on`,`created_by`,`modified_on`,`modified_by`) VALUES ('0','1084','1','73d708','p_2f2ce','SI67dbe8537','3920','3920','833','{\"1\":{\"virtuemart_calc_id\":1,\"calc_name\":\"\u00c1fa\",\"calc_value\":\"27.0000\",\"result\":833}}','-1680','-1680','4767','833','0','0','0','0','0','-1680','64','P','64','1','1','4','','89.134.115.xx','hu-HU','2015-01-05 20:49:03','1084','2015-01-05 20:49:03','1084')
2015-01-05 20:49:03 ERROR vmError: Couldn't create order

These repeat with every order, and any product, shipping method, payment method. I tried downgrading virtuemart, then upgrading, removing custom php and repairing database through phpmyadmin. Nothing worked.

Also lot of

Quote2015-01-05 20:48:48 ERROR vmError: related product is missing, maybe unpublished...

errors, tried to get rid of them by deleting unpublished items.

If you have any suggestions, I would be really thankful!

GJC Web Design

well - the problem would seem to be  TableOrders::store failed - Duplicate entry '4294967295' for key 'PRIMARY'

the  key 'PRIMARY' for lyzge_virtuemart_orders is as I understand it    virtuemart_order_id

it seems to be trying to insert VALUES ('0'...  - i.e. 0 as the order id - I can't imagine that is correct

for that product is there a related product that is set but missing?

maybe that breaks the order number generation?

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

singletrack

Thanks for the reply!

Which product do you mean? It shows this error if I try to order any product, even ones that have no related products.

GJC Web Design

I meant the product of that particular screenshot but if it is all of them then it is a more general problem - have you tried the database tools in the VM admin-> tools
try 1st "Install or if necessary update tables"

the rest of them will dump your tables so only try on a copy - otherwise it is try to re-install etc
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

singletrack

Yes, I tried that one, ut unfortunately no help, even after several times of trying it, it always displays these messages:

QuotealterTable CHANGE lyzge_virtuemart_customs.custom_params : ALTER TABLE `lyzge_virtuemart_customs` CHANGE COLUMN `custom_params` `custom_params` TEXT NOT NULL DEFAULT ''
alterTable CHANGE lyzge_virtuemart_medias.file_params : ALTER TABLE `lyzge_virtuemart_medias` CHANGE COLUMN `file_params` `file_params` VARCHAR(17500) NOT NULL DEFAULT ''
alterTable CHANGE lyzge_virtuemart_shoppergroups.price_display : ALTER TABLE `lyzge_virtuemart_shoppergroups` CHANGE COLUMN `price_display` `price_display` BLOB NOT NULL DEFAULT ''
Table updated: Tablename lyzge_virtuemart_customs dropped: 0 altered: 1 added: 0
Table updated: Tablename lyzge_virtuemart_medias dropped: 0 altered: 1 added: 0
Table updated: Tablename lyzge_virtuemart_shoppergroups dropped: 0 altered: 1 added: 0
Database updated

Any other suggestions? Could I only rebuild the portion of the database that is corrupted?

singletrack

Luckily I solved it - had to delete the virtuemart_orders table from the database and install fresh one.

Milbo

Actually the problem is the key. I assume you migrated an old vm1 shop. There is a function in vm2.6 doing that, but not in vm3, I removed it. It is rewriting all your virtuemart_order_ids to ints.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Hangz

Strange thing but one of our Joomla (ver.: 2.5.28) + VM (ver.: 2.6.10) site has similar error messages in com_virtuemart.log file with exactly same virtuemart_order_id.

2015-03-27 12:52:59 ERROR vmError: TableOrders::store failed - Duplicate entry '4294967295' for key 'PRIMARY' SQL=INSERT INTO `###_virtuemart_orders` (`virtuemart_order_id`,`virtuemart_user_id`,`virtuemart_vendor_id`,`order_number`,`order_pass`,`customer_number`,`order_total`,`order_salesPrice`,`order_billTaxAmount`,`order_billTax`,`order_billDiscountAmount`,`order_discountAmount`,`order_subtotal`,`order_tax`,`order_shipment`,`order_shipment_tax`,`order_payment`,`order_payment_tax`,`coupon_discount`,`order_discount`,`order_currency`,`order_status`,`user_currency_id`,`user_currency_rate`,`virtuemart_paymentmethod_id`,`virtuemart_shipmentmethod_id`,`customer_note`,`ip_address`,`order_language`,`created_on`,`created_by`,`modified_on`,`modified_by`) VALUES ('0','0','1','d7c70398','p_96c7f','nonreg_###@###.com','7059.555858','6844.925858','1500.850458','{\"4\":{\"virtuemart_calc_id\":4,\"calc_name\":\"\u00c1fa 27 %\",\"calc_value\":\"27.0000\",\"result\":45.63}}','0','0','5389.7054','1455.220458','0','0','169','45.63','0','0','64','P','64','1','1','12','','81.183.208.xx','hu-HU','2015-03-27 12:52:59','0','2015-03-27 12:52:59','0')
2015-03-27 12:52:59 ERROR vmError: Couldn't create order

This order ID is looks like fake, because the auto generated ids before this "order" were absolutely different.
In this case I can only think some sort of malicious activity...

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Studio 42

Hi,
I reply here because this is not a hacked database, but a faillure.
I had exactly the same problem and searched 2 hours why.
First i have checked DB about this entry 4294967295 and this is the MAX value possible in the ordes table.
My customer have installed an order numbering plugin and this was the cause, because the plugin changed the ID and not the number to a higher value as MAX possible value.
In this case myslq use max Value possible.
If you only remove this entry 4294967295, it not work, you need to reset the ID counter after using :
Quotealter table XXX_virtuemart_orders auto_increment = 1;
Or mysql continue to count from 4294967295

Milbo

hahahah :-) Thank you for telling that, Patrick. I know it is not your error. ooh my gosh, do you remember that I tell people all the time that they should use the orderNUMBER and that the virtuemart_order_id is for the program only and not something to use to communicate outside.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/