0

I'm running Magento 1.9.1.1. I have an IWD one page checkout installed with a compatible theme. I have also installed MSP multi-flat shipping.

Upon testing my site, everything works fine. However with the IWD One page checkout module activated, the site hangs on checkout when selecting a different delivery option. I have logs activated, and below is the exception error:

Exception error 
2016-07-10T19:20:25+00:00 ERR (3): 
exception 'Mage_Core_Exception' with message 'Invalid block type: Mage_Braintree_Payments_Block_Datajs' in /home/onyxclot/public_html/app/Mage.php:595
Stack trace:
#0 /home/onyxclot/public_html/app/code/core/Mage/Core/Model/Layout.php(495): Mage::throwException('Invalid block t...')
#1 /home/onyxclot/public_html/app/code/core/Mage/Core/Model/Layout.php(437): Mage_Core_Model_Layout->_getBlockInstance('braintree_payme...', Array)
#2 /home/onyxclot/public_html/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('braintree_payme...', 'braintree_payme...')
#3 /home/onyxclot/public_html/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('braintree_payme...', 'braintree_payme...')
#4 /home/onyxclot/public_html/app/code/local/Smartwave/All/Model/Core/Layout.php(40): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#5 /home/onyxclot/public_html/app/code/core/Mage/Core/Model/Layout.php(205): Smartwave_All_Model_Core_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#6 /home/onyxclot/public_html/app/code/local/Smartwave/All/Model/Core/Layout.php(31): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#7 /home/onyxclot/public_html/app/code/core/Mage/Core/Model/Layout.php(210): Smartwave_All_Model_Core_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#8 /home/onyxclot/public_html/app/code/local/Smartwave/All/Model/Core/Layout.php(31): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#9 /home/onyxclot/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Smartwave_All_Model_Core_Layout->generateBlocks()
#10 /home/onyxclot/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(269): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#11 /home/onyxclot/public_html/app/code/community/IWD/Opc/controllers/IndexController.php(155): Mage_Core_Controller_Varien_Action->loadLayout()
#12 /home/onyxclot/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): IWD_Opc_IndexController->indexAction()
#13 /home/onyxclot/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#14 /home/onyxclot/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#15 /home/onyxclot/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#16 /home/onyxclot/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#17 /home/onyxclot/public_html/index.php(87): Mage::run('', 'store')
#18 {main}

Would someone be able to advise what is wrong and what needs to be done to resolve this?

| improve this question | | | | |
2

First of all this is causing by third party module.

Looking at your log tells me it's module called Braintree.

What has gone wrong?

The addBlock, createBlock, and _getBlockInstance methods all expect the first parameter to be a class alias string for the block. Something like braintree/payment. However, in your system, this string is missing.

How to fix?

Because it is third party module, you should contact it's developer. If you cannot reach them then you can do couple of things:

See these lines:

#1 /home/onyxclot/public_html/app/code/core/Mage/Core/Model/Layout.php(437): Mage_Core_Model_Layout->_getBlockInstance('braintree_payme...', Array)
#2 /home/onyxclot/public_html/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('braintree_payme...', 'braintree_payme...')
#3 /home/onyxclot/public_html/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('braintree_payme...', 'braintree_payme...')

Here _getBlockInstance, createBlock and addBlock are having difficulty getting the right block. In another word somewhere in your system these blocks are called but they don't exist.

It could be missing type or typo in your layout.

When calling block, you should follow standard pattern.

Take a look this: to call Mage_Checkout_Block_Cart you should call this way: type="checkout/cart"

Check layout file of this module and also block files, if they are calling any of these method: _getBlockInstance, createBlock and addBlock.

More reading

| improve this answer | | | | |

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