简体   繁体   English

Magento-无效的块类型

[英]Magento - Invalid block type

Whenever I place an order using Buckaroo's Payment Guarantee method I get a message saying: Your payment was not successful. 每当我使用Buckaroo的付款保证方法下订单时,都会收到一条消息:您的付款不成功。 Please try again or choose another payment method. 请重试或选择其他付款方式。

The following stack trace code then gets added to the exception.log file: 然后将以下堆栈跟踪代码添加到exception.log文件:

   2014-03-07T14:10:26+00:00 ERR (3): 
    exception 'Mage_Core_Exception' with message 'Invalid blocktype: ' in /app/Mage.php:594
    Stack trace:
    #0 /app/code/core/Mage/Core/Model/Layout.php(495): Mage::throwException('Invalid blockty...')
    #1 /app/code/core/Mage/Core/Model/Layout.php(437): Mage_Core_Model_Layout->_getBlockInstance('', Array)
    #2 /app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('', 'cart_sidebar')
    #3 /app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('', 'cart_sidebar')
    #4 /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 /app/code/core/Mage/Core/Model/Layout.php(210): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
    #6 /app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
    #7 /app/code/core/Mage/Catalog/controllers/CategoryController.php(146): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
    #8 /app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Catalog_CategoryController->viewAction()
    #9 /app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('view')
    #10 /app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
    #11 /app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
    #12 /app/Mage.php(683): Mage_Core_Model_App->run(Array)
    #13 /index.php(87): Mage::run('', 'store')
    #14 {main}

It says invalid blocktype: and doesn't appear to display a name. 它说无效的块类型:并且似乎没有显示名称。

Don't suppose it has anything to do with this bit of code which creates a block in the form.phtml of the payment method? 不要以为这与在付款方式的form.phtml中创建一个块的这段代码无关吗?

<?php echo $this->getLayout()->createBlock('core/template')->setTemplate('buckaroo3extended/paymentguarantee/termsAndConditions.phtml')->toHtml();?>

most probably there is a block declared in your layout file without a type. 最有可能在您的布局文件中声明了一个没有类型的块。
Something like this: 像这样:

<block name="cart_sidebar" ...>...</block>

and it should be 它应该是

<block type="checkout/cart_sidebar" name="cart_sidebar">...</block>

or it should be 或者应该是

<reference name="cart_sidebar">...</reference>

My money is on the second one. 我的钱在第二笔上。 So look in your layout files for cart_sidebar . 因此,在布局文件中查找cart_sidebar

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM