VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: Vlad44b on December 31, 2013, 19:27:33 PM

Title: vmError: TableInvoices COM_VIRTUEMART_INVOICE_NUMBER empty
Post by: Vlad44b on December 31, 2013, 19:27:33 PM
When I try deleting order I got:
vmError: TableInvoices COM_VIRTUEMART_INVOICE_NUMBER пустое. Это поле является обязательным, пожалуйста, введите ваши данные.

In English:
vmError: TableInvoices COM_VIRTUEMART_INVOICE_NUMBER empty. This field is required, please enter your details.

Joomla! 2.5.17
VM 2.0.26a (translate Russian)
PHP 5.4
Title: Re: vmError: TableInvoices COM_VIRTUEMART_INVOICE_NUMBER empty
Post by: Vlad44b on December 31, 2013, 19:39:31 PM
The same problem with version PHP 5.5  :(
Title: Re: vmError: TableInvoices COM_VIRTUEMART_INVOICE_NUMBER empty
Post by: shopper999 on January 04, 2014, 16:21:58 PM
OK, I think the error messages are confusing:

On deleting the order from the list, I get:

vmError: TableInvoices The given COM_VIRTUEMART_INVOICE_NUMBER is empty. This field is obligatory, please enter your data and store again.


In german it says

vmError: TableInvoices Der angegebene COM_VIRTUEMART_INVOICE_NUMBER existiert bereits.

which means: The Invoice number already exists.

This is a hint, that you try to delete an order, for which there is already an invoice genereated!

And indeed, in the DB table, there is an invoice for this order number!

OK, I could solve my problem!

My problem was: I copied the CMS for testing purposes, and I didn't copy the already created PDF invoices, too.

Please make sure, that the PDF invoices are in the correct filesystem-path, so they can be deleted on deleting the order.


Try again. I do not get any more errors, now.
Title: Re: vmError: TableInvoices COM_VIRTUEMART_INVOICE_NUMBER empty
Post by: Milbo on January 04, 2014, 16:46:10 PM
That makes indeed sense, because invoices are only stored as pdfs and created from orders.
Title: Re: vmError: TableInvoices COM_VIRTUEMART_INVOICE_NUMBER empty
Post by: picard on January 06, 2014, 18:42:10 PM
Hi,

I ran into the same problem. The folder was not set correct. Now I have a lot of "test orders" which I want to delete. But the system prevents me due to the error message above. There are now pdfs at all. How to solve this one?

best regards
picard
Title: Re: vmError: TableInvoices COM_VIRTUEMART_INVOICE_NUMBER empty
Post by: Vlad44b on January 07, 2014, 13:19:48 PM
QuotePlease make sure, that the PDF invoices are in the correct filesystem-path, so they can be deleted on deleting the order.

Excuse me but where setting PDF invoices filesystem-path?
Title: Re: vmError: TableInvoices COM_VIRTUEMART_INVOICE_NUMBER empty
Post by: shopper999 on January 07, 2014, 13:51:16 PM
Configuration -> Configuration -> Templates -> Safe Path

This should be a path outside your Document-Root.
Title: Re: vmError: TableInvoices COM_VIRTUEMART_INVOICE_NUMBER empty
Post by: Vlad44b on January 08, 2014, 10:11:26 AM
Quote from: shopper999 on January 07, 2014, 13:51:16 PM
Configuration -> Configuration -> Templates -> Safe Path

This should be a path outside your Document-Root.

This path is set for me by my hosting provider. On my hosting such a rule:
/home/my FTP Login/site address/vmfiles/
After press Save - VM shows that this settings are correct.
Title: Re: vmError: TableInvoices COM_VIRTUEMART_INVOICE_NUMBER empty
Post by: shopper999 on January 08, 2014, 10:19:12 AM
Are there any PDFs in that directory?
Title: Re: vmError: TableInvoices COM_VIRTUEMART_INVOICE_NUMBER empty
Post by: Vlad44b on January 08, 2014, 10:35:55 AM
My steps today:
1. Clean folder /vmfiles/invoices
2. Create order.
3. Delete order.
ALL FINE

1. Create new order.
2. Create PDF invoice of this order (press and save on my comp).
3. Delete order.
Result:
vmError: TableInvoices COM_VIRTUEMART_INVOICE_NUMBER empty...


Title: Re: vmError: TableInvoices COM_VIRTUEMART_INVOICE_NUMBER empty
Post by: shopper999 on January 08, 2014, 10:45:49 AM
Quote from: Vlad44b on January 08, 2014, 10:35:55 AM
My steps today:
1. Clean folder /vmfiles/invoices
2. Create order.
3. Delete order.
ALL FINE

1. Create new order.
2. Create PDF invoice of this order (press and save on my comp).

At this step, please have a look at the folder. Is the pdf there (before deleting the order)?
If there is no pdf, perhaps, the folder has the wrong permissions, so the webserver cannot write in that folder to store the pdf.

If you try to delete an order, VM tries to delete a pdf, which is not there.
Title: Re: vmError: TableInvoices COM_VIRTUEMART_INVOICE_NUMBER empty
Post by: Vlad44b on January 08, 2014, 11:05:07 AM
QuoteAt this step, please have a look at the folder. Is the pdf there (before deleting the order)?
Yes I see pdf there.
folder permissions /vmfiles = "777"
folder permissions /vmfiles/invoices = "777"

After delete order I got vmError: TableInvoices and pdf still there in folder /vmfiles/invoices
Title: Re: vmError: TableInvoices COM_VIRTUEMART_INVOICE_NUMBER empty
Post by: Vlad44b on January 10, 2014, 18:55:19 PM
The same problem in 2.0.26d   :'(
Title: Re: vmError: TableInvoices COM_VIRTUEMART_INVOICE_NUMBER empty
Post by: shopper999 on January 10, 2014, 21:36:51 PM
Is there anything in the Server Logfile?? PHP errors??
Title: Re: vmError: TableInvoices COM_VIRTUEMART_INVOICE_NUMBER empty
Post by: Vlad44b on January 10, 2014, 22:34:29 PM
Quote from: shopper999 on January 10, 2014, 21:36:51 PM
Is there anything in the Server Logfile?? PHP errors??

Just warns after delete order:
[Fri Jan 10 23:20:02 2014] [warn] [client 178.94.83.247] mod_fcgid: stderr: PHP Strict Standards:  Declaration of JParameter::loadSetupFile() should be compatible with JRegistry::loadSetupFile() in /home/t1WD4d9i20935/bestshop.um.la/libraries/joomla/html/parameter.php on line 512, referer: http://bestshop.um.la/index.php/vasha-korzina/checkout
[Fri Jan 10 23:20:02 2014] [warn] [client 178.94.83.247] mod_fcgid: stderr: PHP Strict Standards:  Declaration of VirtueMartModelMedia::store() should be compatible with VmModel::store(&$data) in /home/t1WD4d9i20935/bestshop.um.la/administrator/components/com_virtuemart/models/media.php on line 439, referer: http://bestshop.um.la/index.php/vasha-korzina/checkout
[Fri Jan 10 23:20:02 2014] [warn] [client 178.94.83.247] mod_fcgid: stderr: PHP Strict Standards:  Non-static method mod_vp_era_vm_product::addtocart() should not be called statically in /home/t1WD4d9i20935/bestshop.um.la/modules/mod_vp_era_vm_product/tmpl/default.php on line 151, referer: http://bestshop.um.la/index.php/vasha-korzina/checkout

Please check PM.
Title: Re: vmError: TableInvoices COM_VIRTUEMART_INVOICE_NUMBER empty
Post by: shopper999 on January 11, 2014, 06:45:12 AM
Hey Vlad44b,

I took your credentials and tested your shop.
I created an order.
When I change the status to "confirmed" an invoice is being generated in the safe path, with filename "vminvoice_140111acd05.pdf".

I can successfully delete the order in the backend, without any errors.
Message: "Orders successfully deleted."
At this point, the PDF filename is not deleted, but changed to another name "140111acd05_20140111.pdf".

I tried the same in my own VM installation. The same effect. The PDF is only renamed after deletition.

@VM experts: Is this usual?
@Vlad44b: The only thing I changed, was the backend-language to english, and I didn't get such errors, as you stated. Can you confirm this?

Nevertheless, the order is being deleted from the backend order-history, but the pdf is only renamed in the filesystem. Why?

Beside all this: Another interesting thing:
If I switch your FRONTEND language from russian to english, I do not see products an more,
and other messages like "No shipment method has been configurated".
I didn't know, that this is language dependant...


In the end, I think your problems are caused by a broken translation in front- and backend.
I would be interested, why the invoices are only renamed? Perhaps for future reference by the shop owner?
Title: Re: vmError: TableInvoices COM_VIRTUEMART_INVOICE_NUMBER empty
Post by: Vlad44b on January 11, 2014, 07:41:24 AM
Thank you for your help.

QuoteIf I switch your FRONTEND language from russian to english, I do not see products an more,

This is not a problem. Depends on the language.

Quote@Vlad44b: The only thing I changed, was the backend-language to english, and I didn't get such errors, as you stated. Can you confirm this?

My steps now:
1. Change the backend-language to English.
2. Delete all orders from folder /vmfiles/invoices
3. Create first new order.
4. Press button (+) to create invoice from this order and save it on my computer.
5. Delete order.
Result - vmError: TableInvoices The given COM_VIRTUEMART_INVOICE_NUMBER is empty. This field is obligatory, please enter your data and store again.
6. Reopen FTP /vmfiles/invoices - PDF order still here.

Did you point number 4?
Thanks.
Title: Re: vmError: TableInvoices COM_VIRTUEMART_INVOICE_NUMBER empty
Post by: shopper999 on January 11, 2014, 07:55:43 AM
Very strange. I didn't get this error on your shop.

Where do you do this exactly? You mean the graphic?
Quote
4. Press button (+) to create invoice from this order and save it on my computer.
I didn't do it this way.
I created the invoice by changing the status in the order-list.
Click the order, change the status to "confirmed" in the dropdown, click "Update".


I deleted by checking the checkbox in the order-history list, and click on delete.

Quote
6. Reopen FTP /vmfiles/invoices - PDF order still here.
Is the filename renamed?

I also used the admin-user in the frontend, to buy the product. Do you use another user?
Title: Re: vmError: TableInvoices COM_VIRTUEMART_INVOICE_NUMBER empty
Post by: Vlad44b on January 11, 2014, 08:15:33 AM
QuoteI didn't do it this way.

This error only after:
4. Press button (+) to create invoice from this order and save it on my computer.

Just exactly repeat my steps and do not forget the item number 4.
Title: Re: vmError: TableInvoices COM_VIRTUEMART_INVOICE_NUMBER empty
Post by: shopper999 on January 11, 2014, 11:43:38 AM
OK, I got it.
You created a delivery note, not an invoice!

The error occurs ONLY in the following case:
If the status is "pending", and I create a DELIVERY NOTE    without AN INVOICE !!!!!!
I can download the delivery note.

If I then delete an order, the message appears:

vmError: TableInvoices The given COM_VIRTUEMART_INVOICE_NUMBER is empty. This field is obligatory, please enter your data and store again.

but the order is deleted anyway (from the list, don't know if it's clean in the DB).

I can reproduce this situation in my own VM installation.

So milbo, it's time for you ;-)

At this time, I don't think, that this is critical, because the order seems to be deleted.
As a workaround, you can simply also create an invoice (the symbol on the right) and delete the order afterwards without errors.

Still my question: Why are the pdfs renamed instead of deleted? For future reference?
Title: Re: vmError: TableInvoices COM_VIRTUEMART_INVOICE_NUMBER empty
Post by: Vlad44b on January 11, 2014, 15:02:16 PM
QuoteI can reproduce this situation in my own VM installation.

Thank you for helping to reproduce this error.

QuoteSo milbo, it's time for you ;-)

Let's hope for the fix in the next release.

QuoteStill my question: Why are the pdfs renamed instead of deleted? For future reference?

I tried your steps:
1. Create new order.
2. Change to confirmed
3. Press Update Order Status
Got:
vmError: Vendor image given image is not complete images/stories/virtuemart/vendor/.
1 order(s) have been updated
4. Check folder /vmfiles/invoices and found file - vminvoice_140111de6015.pdf
5. Delete order. Orders successfully deleted.
6. Reopen FTP folder /vmfiles/invoices and found file name - 140111de6015_20140111.pdf


PHP 5.5
Title: Re: vmError: TableInvoices COM_VIRTUEMART_INVOICE_NUMBER empty
Post by: shopper999 on January 11, 2014, 17:03:02 PM
Yes, that's the normal situation.

The error

vmError: Vendor image given image is not complete images/stories/virtuemart/vendor/.

is raised, because you can put a vendor image into the header of the pdf invoice.
Because you didn't set a vendor image, e.g. your logo, this message appears.

If you would like to fix this, you just simply need to upload an image at Shop -> Shop -> Vendor -> (scroll down to "Upload File").
Title: Re: vmError: TableInvoices COM_VIRTUEMART_INVOICE_NUMBER empty
Post by: Farshad88 on January 11, 2014, 19:15:20 PM
Yes, I also confirms.

1. Create new order.
2. Status is "pending". Press button (+) to create delivery note from this order and save it.
3. Delete order.
Result - vmError: TableInvoices The given COM_VIRTUEMART_INVOICE_NUMBER is empty. This field is obligatory, please enter your data and store again.

Title: Re: vmError: TableInvoices COM_VIRTUEMART_INVOICE_NUMBER empty
Post by: eag on January 15, 2014, 19:46:14 PM
I have about 40 test orders on my site.

I am trying to remove them, but it's not possible.

When I try to delete an order, I get the multiple messages, depending on the situation:
When the order is marked as pending or canceled:
VMerror: VirtueMartModelOrders :: remove 26
Orders Could not be deleted.

When the order is marked as confirmed:
VMerror: The Given COM_VIRTUEMART_INVOICE_NUMBER TableInvoices is empty. This field is obligatory, Please enter your data and store again.
VMerror: VirtueMartModelOrders :: remove 23
Orders Could not be deleted.


In all cases, the order still appears in the list of orders, but the order has lost all information about the buyer and the products purchased.

No error in php.log.

How I can clean my store for all orders? if possible without having to do it manually in the database, now I can do it this way, but when the client is managing it can be a problem.

thanks in advance

VM 2.0.26d
Joomla 2.5.17
Title: Re: vmError: TableInvoices COM_VIRTUEMART_INVOICE_NUMBER empty
Post by: apri on March 31, 2015, 16:41:11 PM
do you still need the answer? PM me