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

Joomla 4 and VM 3.8.9 10560 page can't be found errors

Started by ssc3, November 12, 2021, 00:29:38 AM

Previous topic - Next topic

ssc3

Getting occasional page can't be found errors in Joomla 4 and VM 3.8.9 10560

The cause seems to be be passing messages via the redirect function which is deprecated.

However enqueueMessage() can be used instead.

in cart.php change

//$app->redirect(JRoute::_('index.php?option=com_virtuemart&view=cart&task='.$task,$this->useXHTML,$this->useSSL), $msg);
$app->enqueueMessage($msg);
$app->redirect(JRoute::_('index.php?option=com_virtuemart&view=cart&task='.$task,$this->useXHTML,$this->useSSL));


//$app->redirect(JRoute::_($relUrl,$this->useXHTML,$this->useSSL), $redirectMsg);
$app->enqueueMessage($redirectMsg);
$app->redirect(JRoute::_($relUrl,$this->useXHTML,$this->useSSL));


//$app->redirect(JRoute::_('index.php?option=com_virtuemart&view=cart'.$layoutName, FALSE), vmText::_('COM_VIRTUEMART_CART_CHECKOUT_DONE_CONFIRM_ORDER'));
$app->enqueueMessage(vmText::_('COM_VIRTUEMART_CART_CHECKOUT_DONE_CONFIRM_ORDER'));
$app->redirect(JRoute::_('index.php?option=com_virtuemart&view=cart'.$layoutName, FALSE));


// $app->redirect(JRoute::_('index.php?option=com_virtuemart&view=cart'.$this->getLayoutUrlString(), FALSE), vmText::_('COM_VIRTUEMART_CART_CHECKOUT_DATA_CHANGED'));
$app->enqueueMessage(vmText::_('COM_VIRTUEMART_CART_CHECKOUT_DATA_CHANGED'));
$app->redirect(JRoute::_('index.php?option=com_virtuemart&view=cart'.$this->getLayoutUrlString(), FALSE));


// $app->redirect(JRoute::_('index.php?option=com_virtuemart&view=cart'.$this->getLayoutUrlString(), FALSE), vmText::_('COM_VIRTUEMART_CART_CHECKOUT_DATA_NOT_VALID'));
$app->enqueueMessage(vmText::_('COM_VIRTUEMART_CART_CHECKOUT_DATA_NOT_VALID'));
$app->redirect(JRoute::_('index.php?option=com_virtuemart&view=cart'.$this->getLayoutUrlString(), FALSE));


edited to add other redirects in cart.php . Enqueue message before redirect.

These are the redirects causing the most common problems during checkout, but there are other similar redirects used elsewhere.

Virtuemart Payment Plugins
https://plugins.online-store.co.uk