VirtueMart Forum

VirtueMart 2 + 3 + 4 => Installation, Migration & Upgrade => Topic started by: Daniel Sjöstrand on March 16, 2015, 00:27:38 AM

Title: Error in Deleting new orders after migrate
Post by: Daniel Sjöstrand on March 16, 2015, 00:27:38 AM
I have a problem deleting new orders after upgrade.
I get this error message

vmError: TableInvoices COM_VIRTUEMART_INVOICE_NUMBER in record is missing! Can't save the record with no COM_VIRTUEMART_INVOICE_NUMBER

Looking in the database I see that deleting an order does not delete latest input into table "virtuemart_invoices"

The invoice is created correctly and sent through email.
I can delete old orders without error.

I also see an unconsistancy in the virtuemart_invoice_id table, a jump from 681,682,693,694 etc.
The orders after the jump is new test orders only. Tried the "repair table" i phpmyadmin - but it still jumps in the sequence
  - I actually solved this using - Repair table in phpmyadmin and then changed the AUTO_INCREMENT to correct value - but still the same error.

So please any hint on how to correct this database and probably remove the error would be really appreciated

VirtueMart 3.0.6.2 (upgrade from 2.0.24c)
Joomla 3.4 (upgrader from Joomla! 2.5.8)
Title: Re: Error in Deleting new orders after migrate
Post by: Daniel Sjöstrand on March 18, 2015, 12:15:10 PM
Fixed the miss match on table invoices autoincrease with phpmyadmin

Only thing not working is when deleting orders the invoice is not renamed as it should.
Instead of solving this i decided to add a new order status and not delete the faulty orders.

Title: Re: Error in Deleting new orders after migrate
Post by: apri on March 31, 2015, 01:53:06 AM
I think it's a bug in virtuemart, I've attached mysql log, which was generated upon clicking on delete order. by the end of the fragment, last statement before generating error was delete from jos_virtuemart_orders, and then an error message into user session, so I think the code was looking for the some info from the virtuemart_orders, but that record was gone



Title: Re: Error in Deleting new orders after migrate
Post by: Milbo on April 01, 2015, 14:26:43 PM
Apri, I answered you already here http://forum.virtuemart.net/index.php?topic=129123.0
which should be also the solution for
Quote from: Daniel Sjöstrand on March 18, 2015, 12:15:10 PM
Only thing not working is when deleting orders the invoice is not renamed as it should.
Title: Re: Error in Deleting new orders after migrate
Post by: Daniel Sjöstrand on April 07, 2015, 12:18:29 PM
Yes worked perfectly