Magento:无效的blocktype

时间:2015-10-20 14:21:29

标签: magento

我得到以下例外情况。不幸的是,我无法在互联网上找到解决方案。

由于这些异常只是出现,当我激活OneStepCheckout扩展时,我认为这是一个问题。

一切都在商店里正常运作(据我测试过)但我认为应该始终注意一个例外。

我已经尝试过Mage_Braintree_ *的文件搜索,但没有找到任何内容。

任何提示?

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}

修改 感谢Prakash Thapa。我在app / design / frontend / base / default / layout / lotusbreath / onestepcheckout.xml中找到了一个braintree部分

<!-- 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>

由于我没有使用任何braintree付款延期,我应该删除此部分还是应该如何处理?

目前,似乎只是删除(或评论出来)部分运作良好。

1 个答案:

答案 0 :(得分:3)

由于布局xml中的无效块类型(如

)而发生此错误
 <reference name="....">
        <block type=".." />
</reference>

尝试找到问题设计布局,例如 app / design / frontend / base / default / layout / EXTENSION_LAYOUT.xml EXTENSION_LAYOUT.xml可以是braintree.xml之类的东西。