我有Magento 1.7.0.2,最近我在/var/log/exception.log文件中注意到一些有关无效块类型的异常。 但是,我没有注意到前端有任何明显的故障。 以下是相关异常的示例:

2019-11-06T10:38:42+00:00 ERR (3): exception 'Mage_Core_Exception' with message 'Invalid Block Type: Mage_Checkout_Block_Cart_Minicart' in /app/Mage.php:594 Stack trace: #0 /app/code/core/Mage/Core/Model/Layout.php(495): Mage::throwException('Invalid block t...') #1 /app/code/core/Mage/Core/Model/Layout.php(437): Mage_Core_Model_Layout->_getBlockInstance('checkout/cart_m...', Array) #2 /app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('checkout/cart_m...', 'header.cart') #3 /app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('checkout/cart_m...', 'header.cart') #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(254): 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(105): Mage::run('store', 'website') #14 {main} 2019-11-06T10:38:42+00:00 ERR (3): exception 'Mage_Core_Exception' with message 'Invalid Block Type: Mage_Page_Block_Html_Topmenu_Renderer' in /app/Mage.php:594 Stack trace: #0 /app/code/core/Mage/Core/Model/Layout.php(495): Mage::throwException('Invalid block t...') #1 /app/code/core/Mage/Core/Model/Layout.php(437): Mage_Core_Model_Layout->_getBlockInstance('page/html_topme...', Array) #2 /app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('page/html_topme...', 'catalog.topnav....') #3 /app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('page/html_topme...', 'catalog.topnav....') #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(254): 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(105): Mage::run('store', 'website') #14 {main}  ***************************************************************************  2019-11-06T10:45:33+00:00 ERR (3): exception 'Mage_Core_Exception' with message 'Invalid Block Type: Mage_Page_Block_Html_CookieNotice' in /app/Mage.php:594 Stack trace: #0 /app/code/core/Mage/Core/Model/Layout.php(495): Mage::throwException('Invalid block t...') #1 /app/code/core/Mage/Core/Model/Layout.php(437): Mage_Core_Model_Layout->_getBlockInstance('page/html_cooki...', Array) #2 /app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('page/html_cooki...', 'global_cookie_n...') #3 /app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('page/html_cooki...', 'global_cookie_n...') #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(206): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element)) #6 /app/code/core/Mage/Core/Model/Layout.php(206): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element)) #7 /app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks() #8 /app/code/core/Mage/Catalog/Helper/Product/View.php(73): Mage_Core_Controller_Varien_Action->generateLayoutBlocks() #9 /app/code/core/Mage/Catalog/Helper/Product/View.php(144): Mage_Catalog_Helper_Product_View->initProductLayout(Object(Mage_Catalog_Model_Product), Object(Mage_Catalog_ProductController)) #10 /app/code/core/Mage/Catalog/controllers/ProductController.php(132): Mage_Catalog_Helper_Product_View->prepareAndRender(8784, Object(Mage_Catalog_ProductController), Object(Varien_Object)) #11 /app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Catalog_ProductController->viewAction() #12 /app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('view') #13 /app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http)) #14 /app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch() #15 /app/Mage.php(683): Mage_Core_Model_App->run(Array) #16 index.php(105): Mage::run('store', 'website') #17 {main}  ***************************************************************************  2019-09-21T13:54:37+00:00 ERR (3): exception 'Mage_Core_Exception' with message 'Invalid block type: Mage_Directpost_Block_Form' in /app/Mage.php:594 Stack trace: #0 /app/code/core/Mage/Core/Model/Layout.php(495): Mage::throwException('Invalid block t...') #1 /app/code/core/Mage/Core/Model/Layout.php(437): Mage_Core_Model_Layout->_getBlockInstance('directpost/form', Array) #2 /app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('directpost/form', 'payment.form.di...') #3 /app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('directpost/form', 'payment.form.di...') #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/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks() #6 /app/code/core/Mage/Core/Controller/Varien/Action.php(269): Mage_Core_Controller_Varien_Action->generateLayoutBlocks() #7 /app/code/local/Craig/Tco/Model/Observer.php(111): Mage_Core_Controller_Varien_Action->loadLayout('checkout_onepag...') #8 /app/code/core/Mage/Core/Model/App.php(1339): Craig_Tco_Model_Observer->output_tco_redirect(Object(Varien_Event_Observer)) #9 /app/code/core/Mage/Core/Model/App.php(1318): Mage_Core_Model_App->_callObserverMethod(Object(Craig_Tco_Model_Observer), 'output_tco_redi...', Object(Varien_Event_Observer)) #10 /app/Mage.php(447): Mage_Core_Model_App->dispatchEvent('controller_acti...', Array) #11 /app/code/core/Mage/Core/Controller/Varien/Action.php(547): Mage::dispatchEvent('controller_acti...', Array) #12 /app/code/core/Mage/Core/Controller/Front/Action.php(80): Mage_Core_Controller_Varien_Action->postDispatch() #13 /app/code/core/Mage/Core/Controller/Varien/Action.php(423): Mage_Core_Controller_Front_Action->postDispatch() #14 /app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('saveOrder') #15 /app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http)) #16 /app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch() #17 /app/Mage.php(683): Mage_Core_Model_App->run(Array) #18 /index.php(105): Mage::run('base', 'website') #19 {main} 

如果这些异常是由于缺少文件引起的,那么我检查了Magento的安装,但没有找到以下文件:

/app/code/core/Mage/Page/Block/Html/Topmenu/Renderer.php /app/code/core/Mage/Checkout/Block/Cart/Minicart.php /app/code/core/Mage/Page/Block/Html/CookieNotice.php /app/code/core/Mage/Directpost/Block/Form.php 

这些文件不是Magento 1.7.0.2的标准安装包随附的。 我不知道是否有一些补丁包括对这些文件的调用。

未解决问题?本站智能推荐: