Hi,
I upgraded to the latest Virtuemart (VirtueMart 4.2.2 10908) and Joomla (4.3.4) version. Since then, I can no longer generate invoices from the orders page. Error: vmError: getInvoicePDF Cant create pdf, no entry
I have removed the overrides for the invoice template, but I still receive the same error.
Any help would be greatly appreciated
Best, Alexander
It is likely failing as no invoice number is generated/available:
com_virtuemart > controllers > invoice.php
if( $layout == 'invoice' and (!$invoiceNumber or empty($invoiceNumber))){
$r = 'getInvoicePDF Cant create pdf, no entry for layout '.$layout;
vmError($r, $r);
return 0;
When and where is the invoice number generated? Can I set it manually?
From Max Milbers via support ticket.
I think I found the problem. A fast solution, open the invoice model at /administrator/components/com_virtuemart/models/inovice.php around line 162, search for
function getExistingIfUnlockedCreateNewInvoiceNumber($orderDetails, &$invoiceNumber, $force_create_invoice = 0){
and just change the last 0 to null
function getExistingIfUnlockedCreateNewInvoiceNumber($orderDetails, &$invoiceNumber, $force_create_invoice = null){
Quote from: rednaxela on September 06, 2023, 20:18:23 PM
From Max Milbers via support ticket.
I think I found the problem. A fast solution, open the invoice model at /administrator/components/com_virtuemart/models/inovice.php around line 162, search for
function getExistingIfUnlockedCreateNewInvoiceNumber($orderDetails, &$invoiceNumber, $force_create_invoice = 0){
and just change the last 0 to null
function getExistingIfUnlockedCreateNewInvoiceNumber($orderDetails, &$invoiceNumber, $force_create_invoice = null){
I have the same error, and I cannot find that line of code...
The file is /administrator/components/com_virtuemart/models/invoice.php not inovice.php (a Max typo)
It is correct in current member version 4.2.4 10922
Quote from: jenkinhill on October 05, 2023, 15:53:02 PM
The file is /administrator/components/com_virtuemart/models/invoice.php not inovice.php (a Max typo)
It is correct in current member version 4.2.4 10922
function getExistingIfUnlockedCreateNewInvoiceNumber($orderDetails, &$invoiceNumber, $force_create_invoice = 0){
this function does not have the force create invoice parameter.
Quote from: jenkinhill on October 05, 2023, 15:53:02 PM
The file is /administrator/components/com_virtuemart/models/invoice.php not inovice.php (a Max typo)
It is correct in current member version 4.2.4 10922
I have the same issue and apply this fix in VM 4.2.0 10905
Then I got a new error msg: array_push(): Argument #1 ($array) must be of type array, null given
Does anyone know what can be done?
Really appreciated
There have been more bugfixes in the latest member version. https://extensions.virtuemart.net/support/virtuemart-supporter-membership-bronze-detail
Quote from: jenkinhill on October 18, 2023, 12:18:59 PM
There have been more bugfixes in the latest member version. https://extensions.virtuemart.net/support/virtuemart-supporter-membership-bronze-detail
You got a changelog perhaps?
You can examine the list of revisions: https://dev.virtuemart.net/projects/virtuemart/repository/virtuemart/revisions