Call to undefined method VmConfig::updateDbEntry() when upgrading.

Started by WebStuff, December 21, 2022, 15:35:01 PM

Previous topic - Next topic

WebStuff

Upgrade to VirtueMart 4.0.12 10777 throws this error for me on my test site:
Call to undefined method VmConfig::updateDbEntry()

Upgrading from VirtueMart 4.0.6 10690 on Joomla 3.10.11

If I refresh and resubmit the upgrade page it then goes through with errors of not deleting some AIO folders and one invalid update extension.

However all seems to work after doing this so far. I can rollback and try again with debugging on if this would help.

WebStuff

First error on Orders List page:
0 in_array(): Argument #2 ($haystack) must be of type array, string given
/home/public_html/test/administrator/components/com_virtuemart/views/orders/view.html.php:344
Call stack
# Function Location
1 () JROOT/administrator/components/com_virtuemart/views/orders/view.html.php:344


This is the offending function, it seems $os_trigger_refunds is not returning an array. It is set in virtuemart.cfg as "os_trigger_refund=-1".
As far as I know this is the default as I have not manually set this.

function adjustOrderStatuslists ($orderStates, &$_orderStatusList, &$orderStatesUnpaid){

$os_trigger_refunds = VmConfig::get('os_trigger_refunds', array('R'));
// Create an array to allow orderlinestatuses to be translated
// We'll probably want to put this somewhere in ShopFunctions...

foreach ($orderStates as $orderState) {
//$_orderStatusList[$orderState->virtuemart_orderstate_id] = $orderState->order_status_name;
//When I use update, I have to use this?
$_orderStatusList[$orderState->order_status_code] = vmText::_($orderState->order_status_name);
$tmp = clone($orderState);
if(in_array($orderState->order_status_code,$os_trigger_refunds)) {

$tmp->order_status_name = 'Unrecommended '.vmText::_( $orderState->order_status_name );
$orderStatesUnpaid[] = $tmp;
} else {
$orderStatesUnpaid[] = $tmp;
}

}

}

Same problem on individual Order page in same file in function "function display($tpl = null)" at line 142.

WebStuff

Same problem with $os_trigger_refund in Frontend on order confirm.

0 in_array(): Argument #2 ($haystack) must be of type array, string given
Call stack
# Function Location
1 () JROOT/components/com_virtuemart/views/invoice/view.html.php:176


And in Frontend ./components/com_virtuemart/views/orders/view.html.php:187

WebStuff

I hate bumping things but any response to this please. Thanks.