0

How to diagnose “Invalid block type ”

Not sure how to figure out this error, I've been googling for a week and I can't seem to find a solution. Any ideas?

    exception 'Mage_Core_Exception' with message 'סוג בלוק מידע לא תקני: Mage_Page_Block_Html_CookieNotice' in /var/www/magento/app/Mage.php:594
        Stack trace:
        #0 /var/www/magento/app/code/core/Mage/Core/Model/Layout.php(495): Mage::throwException('?????? ????????...')
        #1 /var/www/magento/app/code/core/Mage/Core/Model/Layout.php(437): Mage_Core_Model_Layout->_getBlockInstance('page/html_cooki...', Array)
        #2 /var/www/magento/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('page/html_cooki...', 'global_cookie_n...')
        #3 /var/www/magento/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('page/html_cooki...', 'global_cookie_n...')
        #4 /var/www/magento/app/code/local/Smartwave/All/Model/Core/Layout.php(40): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
        #5 /var/www/magento/app/code/core/Mage/Core/Model/Layout.php(205): Smartwave_All_Model_Core_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
        #6 /var/www/magento/app/code/local/Smartwave/All/Model/Core/Layout.php(31): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
        #7 /var/www/magento/app/code/core/Mage/Core/Model/Layout.php(206): Smartwave_All_Model_Core_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
        #8 /var/www/magento/app/code/local/Smartwave/All/Model/Core/Layout.php(31): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
        #9 /var/www/magento/app/code/core/Mage/Core/Model/Layout.php(206): Smartwave_All_Model_Core_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
        #10 /var/www/magento/app/code/local/Smartwave/All/Model/Core/Layout.php(31): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
        #11 /var/www/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Smartwave_All_Model_Core_Layout->generateBlocks()
        #12 /var/www/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(269): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
        #13 /var/www/magento/app/code/core/Mage/Cms/controllers/IndexController.php(90): Mage_Core_Controller_Varien_Action->loadLayout()
        #14 /var/www/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Cms_IndexController->defaultNoRouteAction()
        #15 /var/www/magento/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('defaultNoRoute')
        #16 /var/www/magento/app/code/core/Mage/Core/Controller/Varien/Front.php(201): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
        #17 /var/www/magento/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
        #18 /var/www/magento/app/Mage.php(683): Mage_Core_Model_App->run(Array)
        #19 /var/www/magento/index.php(89): Mage::run('', 'store')
        #20 {main}`enter code here`

1 Answer 1

0

this block is defined in the layout page.xml

<block type="core/text_list" name="before_body_end" as="before_body_end" translate="label">
    <label>Page Bottom</label>
    <block type="page/html_cookieNotice" name="global_cookie_notice" as ="global_cookie_notice" template="page/html/cookienotice.phtml" before="-" />
</block>

And class itself is Mage_Page_Block_Html_CookieNotice (app/code/core/Mage/Page/Block/Html/CookieNotice.php). Check if this class exists in your installation and file is readable.

What version of Magento are you using?

2
  • Thanks for the quick answer. version 1.7 , and this file is missing , i dont have it
    – rotem
    Sep 29, 2017 at 12:11
  • this class was added later. And looks like your theme is based on the layout for 1.9 version. You can remove block global_cookie_notice from the theme layout, or upgrade magento, or try to add class and configuration options for it manually Sep 29, 2017 at 12:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.