【问题标题】:exception 'Mage_Core_Exception' with message 'Invalid block type: Mage_Catalog_Block_Category_List'带有消息“无效块类型:Mage_Catalog_Block_Category_List”的异常“Mage_Core_Exception”
【发布时间】:2012-11-12 19:05:55
【问题描述】:

我的 exception.log 中反复出现以下错误。对故障排除和跟踪有什么建议吗?我没有成功确定问题。

exception 'Mage_Core_Exception' with message 'Invalid block type: Mage_Catalog_Block_Category_List' in /chroot/home/mysite/mywebsite/html/app/Mage.php:550
Stack trace:
#0 /chroot/home/mysite/mywebsite/html/app/code/core/Mage/Core/Model/Layout.php(469): Mage::throwException('Invalid block t...')
#1 /chroot/home/mysite/mywebsite/html/app/code/core/Mage/Core/Model/Layout.php(411): Mage_Core_Model_Layout->_getBlockInstance('catalog/categor...', Array)
#2 /chroot/home/mysite/mywebsite/html/app/code/core/Mage/Core/Model/Layout.php(446): Mage_Core_Model_Layout->createBlock('catalog/categor...', 'catalog.categor...')
#3 /chroot/home/mysite/mywebsite/html/app/code/core/Mage/Core/Model/Layout.php(238): Mage_Core_Model_Layout->addBlock('catalog/categor...', 'catalog.categor...')
#4 /chroot/home/mysite/mywebsite/html/app/code/core/Mage/Core/Model/Layout.php(204): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#5 /chroot/home/mysite/mywebsite/html/app/code/core/Mage/Core/Model/Layout.php(209): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#6 /chroot/home/mysite/mywebsite/html/app/code/core/Mage/Core/Controller/Varien/Action.php(343): Mage_Core_Model_Layout->generateBlocks()
#7 /chroot/home/mysite/mywebsite/html/app/code/core/Mage/Catalog/controllers/ProductController.php(115): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#8 /chroot/home/mysite/mywebsite/html/app/code/core/Mage/Catalog/controllers/ProductController.php(149): Mage_Catalog_ProductController->_initProductLayout(Object(Mage_Catalog_Model_Product))
#9 /chroot/home/mysite/mywebsite/html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Catalog_ProductController->viewAction()
#10 /chroot/home/mysite/mywebsite/html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('view')
#11 /chroot/home/mysite/mywebsite/html/app/code/core/Mage/Core/Controller/Varien/Front.php(177): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#12 /chroot/home/mysite/mywebsite/html/app/code/core/Mage/Core/Model/App.php(304): Mage_Core_Controller_Varien_Front->dispatch()
#13 /chroot/home/mysite/mywebsite/html/app/Mage.php(596): Mage_Core_Model_App->run(Array)
#14 /chroot/home/mysite/mywebsite/html/index.php(78): Mage::run('', 'store')
#15 {main}

【问题讨论】:

    标签: magento exception block categories


    【解决方案1】:

    Mage_Catalog_Block_Category_List
    

    作为一个类存在于:

    app/code/core/Mage/Catalog/Block/Category
    

    app/code/local/Mage/Catalog/Block/Category
    

    我正在运行 Magento 1.7 并且找不到该类。也许您正在寻找:

    Mage_Catalog_Block_Product_List
    

    【讨论】:

    • 是的或 Mage_Catalog_Block_Category_View 。您必须在 xml 布局中输入错误的块。在 catalog.xml 布局文件中搜索“catalog/category”
    • 谢谢!我在“目录产品视图(任何)”部分下发现了有问题的代码,我现在只是将其注释掉。看起来有人正在尝试关注此线程,但从未正确完成。没有对应的 phtml 文件。 magentocommerce.com/boards/viewthread/9632
    猜你喜欢
    • 2017-10-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-08-01
    • 2012-08-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多