Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Magento: Invalid blocktype

Tags:

magento

I get the exceptions below. Unfortunately, I can't really find a solution on the internet.

Since these exceptions are just appearing, when I activate the OneStepCheckout extension, I think it's a problem with this one.

Everything is working fine in the shop (as far as I tested already) but I think an exception should always be taken care of.

I already tried a file search for Mage_Braintree_* but didn't find anything.

Any tips?

2015-10-20T13:57:19+00:00 ERR (3): 
exception 'Mage_Core_Exception' with message 'Ungültiger Blocktyp: Mage_Braintree_Payments_Block_Datajs' in /htdocs/app/Mage.php:595
Stack trace:
#0 /htdocs/app/code/core/Mage/Core/Model/Layout.php(495): Mage::throwException('Ung\xC3\xBCltiger Blo...')
#1 /htdocs/app/code/core/Mage/Core/Model/Layout.php(437): Mage_Core_Model_Layout->_getBlockInstance('braintree_payme...', Array)
#2 /htdocs/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('braintree_payme...', 'braintree_payme...')
#3 /htdocs/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('braintree_payme...', 'braintree_payme...')
#4 /htdocs/app/code/core/Mage/Core/Model/Layout.php(205): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#5 /htdocs/app/code/core/Mage/Core/Model/Layout.php(210): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#6 /htdocs/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
#7 /htdocs/app/code/core/Mage/Core/Controller/Varien/Action.php(269): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#8 /htdocs/app/code/local/Lotusbreath/OneStepCheckout/controllers/IndexController.php(97): Mage_Core_Controller_Varien_Action->loadLayout()
#9 /htdocs/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Lotusbreath_OneStepCheckout_IndexController->indexAction()
#10 /htdocs/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('index')
#11 /htdocs/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#12 /htdocs/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#13 /htdocs/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#14 /htdocs/index.php(83): Mage::run('', 'store')
#15 {main}
2015-10-20T13:57:19+00:00 ERR (3): 
exception 'Mage_Core_Exception' with message 'Ungültiger Blocktyp: Mage_Braintree_Payments_Block_Form' in /htdocs/app/Mage.php:595
Stack trace:
#0 /htdocs/app/code/core/Mage/Core/Model/Layout.php(495): Mage::throwException('Ung\xC3\xBCltiger Blo...')
#1 /htdocs/app/code/core/Mage/Core/Model/Layout.php(437): Mage_Core_Model_Layout->_getBlockInstance('braintree_payme...', Array)
#2 /htdocs/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('braintree_payme...', 'payment.form.br...')
#3 /htdocs/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('braintree_payme...', 'payment.form.br...')
#4 /htdocs/app/code/core/Mage/Core/Model/Layout.php(205): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#5 /htdocs/app/code/core/Mage/Core/Model/Layout.php(210): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#6 /htdocs/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
#7 /htdocs/app/code/core/Mage/Core/Controller/Varien/Action.php(269): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#8 /htdocs/app/code/local/Lotusbreath/OneStepCheckout/controllers/IndexController.php(97): Mage_Core_Controller_Varien_Action->loadLayout()
#9 /htdocs/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Lotusbreath_OneStepCheckout_IndexController->indexAction()
#10 /htdocs/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('index')
#11 /htdocs/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#12 /htdocs/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#13 /htdocs/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#14 /htdocs/index.php(83): Mage::run('', 'store')
#15 {main}

EDIT: Thanks to Prakash Thapa. I found a braintree part in app/design/frontend/base/default/layout/lotusbreath/onestepcheckout.xml

<!-- For braintree -->
<lotusbreath_onestepcheckout_index_index>
    <reference name="head">
        <action method="addJs" ifconfig="payment/braintree/active"><file>braintree/braintree-1.3.4.js</file></action>
        <action method="addCss" ifconfig="payment/braintree/active"><stylesheet>braintree/css/braintree.css</stylesheet></action>
    </reference>
    <reference name="before_body_end">
        <block type="braintree_payments/datajs" ifconfig="payment/braintree/active" name="braintree_payments_data_js" template="lotusbreath/onestepcheckout/braintree/data_js.phtml" />
        <block type="braintree_payments/form" ifconfig="payment/braintree/active" name="payment.form.braintree" template="lotusbreath/onestepcheckout/braintree/review_js.phtml">
            <action method="setMethodInfo"></action>
        </block>
    </reference>
</lotusbreath_onestepcheckout_index_index>

Since I'm not using any braintree payment extensions, should I delete this part or how should I handle this?

For now, it seems that just deleting (or comment it out) the part is working well.

like image 208
alexandre Avatar asked Mar 10 '26 00:03

alexandre


1 Answers

This error occur due to invalid blocktype in layout xml like

 <reference name="....">
        <block type=".." />
</reference>

Try to find problem design layout like in app/design/frontend/base/default/layout/EXTENSION_LAYOUT.xml EXTENSION_LAYOUT.xml can be anything like braintree.xml or so on.

like image 124
Prakash Thapa Avatar answered Mar 12 '26 19:03

Prakash Thapa