1

We are running Magento CE 1.9.3.8 and have noticed an issue when creating an order manually from the admin panel (Sales > Orders > Create New Order).

When we create an order the following error is returned immediately after pressing the "Submit Order" button:

Order saving error: Invalid method Mage_Sales_Model_Order::queueNewOrderEmail(Array () )

A screenshot of the error is below:

enter image description here

From this post there was a suggestion to check for the presence of the queueNewOrderEmail function in app/code/core/Mage/Sales/Model/Order.php - I can confirm this is present.

I also could not see any cases where queueNewOrderEmail was being overridden. Here's a list of files referencing that function:

app/code/core/Mage/Sales/Model/Order.php:    public function queueNewOrderEmail($forceMode = false)
app/code/core/Mage/Sales/Model/Order.php:        $this->queueNewOrderEmail(true);
app/code/core/Mage/Adminhtml/Model/Sales/Order/Create.php:            $order->queueNewOrderEmail();
app/code/core/Mage/Checkout/Model/Cart/Api.php:                    $order->queueNewOrderEmail();
app/code/core/Mage/Checkout/Model/Type/Onepage.php:                    $order->queueNewOrderEmail();
app/code/core/Mage/Checkout/Model/Type/Multishipping.php:                    $order->queueNewOrderEmail();
app/code/core/Mage/Authorizenet/Model/Directpost.php:                $order->queueNewOrderEmail();
app/code/core/Mage/XmlConnect/Model/Paypal/Mep/Checkout.php:                $order->queueNewOrderEmail();
app/code/community/Ess/M2ePro/Model/Buy/Order.php:            if (method_exists($this->getParentObject()->getMagentoOrder(), 'queueNewOrderEmail')) {
app/code/community/Ess/M2ePro/Model/Buy/Order.php:                $this->getParentObject()->getMagentoOrder()->queueNewOrderEmail(false);
app/code/community/Ess/M2ePro/Model/Ebay/Order.php:            if (method_exists($this->getParentObject()->getMagentoOrder(), 'queueNewOrderEmail')) {
app/code/community/Ess/M2ePro/Model/Ebay/Order.php:                $this->getParentObject()->getMagentoOrder()->queueNewOrderEmail(false);
app/code/community/Ess/M2ePro/Model/Amazon/Order.php:            if (method_exists($this->getParentObject()->getMagentoOrder(), 'queueNewOrderEmail')) {
app/code/community/Ess/M2ePro/Model/Amazon/Order.php:                $this->getParentObject()->getMagentoOrder()->queueNewOrderEmail(false);
app/code/community/Phoenix/Moneybookers/Model/Event.php:                $this->_order->queueNewOrderEmail();

Here's what is logged in var/log/exception.log:

Trace: #0 /var/www/vhosts/domain.com/httpdocs/app/code/core/Mage/Adminhtml/Model/Sales/Order/Create.php(1572): Varien_Object->__call('queueNewOrderEm...', Array)
#1 /var/www/vhosts/domain.com/httpdocs/app/code/core/Mage/Adminhtml/Model/Sales/Order/Create.php(1572): Mage_Sales_Model_Order->queueNewOrderEmail()
#2 /var/www/vhosts/domain.com/httpdocs/app/code/core/Mage/Adminhtml/controllers/Sales/Order/CreateController.php(499): Mage_Adminhtml_Model_Sales_Order_Create->createOrder()
#3 /var/www/vhosts/domain.com/httpdocs/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_Sales_Order_CreateController->saveAction()
#4 /var/www/vhosts/domain.com/httpdocs/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('save')
#5 /var/www/vhosts/domain.com/httpdocs/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#6 /var/www/vhosts/domain.com/httpdocs/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#7 /var/www/vhosts/domain.com/httpdocs/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#8 /var/www/vhosts/domain.com/httpdocs/index.php(83): Mage::run('', 'store')
#9 {main}

How can we troubleshoot this? The core code has not been modified yet it appears to be referring to core code in the errors.

1
  • Why this error shows array() in method queueNewOrderEmail It should be only "TRUE" or "FALSE".
    – kunj
    May 17, 2018 at 4:49

1 Answer 1

0

Magento 1.9 have introduced email queue feature, might be Magento_Sales_Model_Order.php class file should be overwritten by any module and those email queue related functions may be missing in that older class.

1
  • This was the issue - app/code/core/Mage/Sales/Model/Order.php was copied to app/code/local/Mage/Sales/Model/Order.php and had customisations. We've deleted the file and now all is well. Thanks.
    – Chris
    May 18, 2018 at 12:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.