1

i created extension for custom form which run perfectly but as i need another page with same form i rename all files & classes it gives me error on my error log like.

    exception 'Mage_Core_Exception' with message 'Invalid block type: Mage_Cusdesign_Block_Adminhtml_Cusdesign' in /home/webfolder/public_html/demo-website/app/Mage.php:595
    Stack trace:
#0 /home/webfolder/public_html/demo-website/app/code/core/Mage/Core/Model/Layout.php(495): Mage::throwException('Invalid block t...')
#1 /home/webfolder/public_html/demo-website/app/code/core/Mage/Core/Model/Layout.php(437): Mage_Core_Model_Layout->_getBlockInstance('cusdesign/admin...', Array)
#2 /home/webfolder/public_html/demo-website/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('cusdesign/admin...', 'cusdesign')
#3 /home/webfolder/public_html/demo-website/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('cusdesign/admin...', 'cusdesign')
#4 /home/webfolder/public_html/demo-website/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 /home/webfolder/public_html/demo-website/app/code/core/Mage/Core/Model/Layout.php(210): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#6 /home/webfolder/public_html/demo-website/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
#7 /home/webfolder/public_html/demo-website/app/code/core/Mage/Core/Controller/Varien/Action.php(269): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#8 /home/webfolder/public_html/demo-website/app/code/core/Mage/Adminhtml/Controller/Action.php(275): Mage_Core_Controller_Varien_Action->loadLayout(NULL, true, true)
#9 /home/webfolder/public_html/demo-website/app/code/local/M3/Cusdesign/controllers/Adminhtml/CusdesignController.php(7): Mage_Adminhtml_Controller_Action->loadLayout()
#10 /home/webfolder/public_html/demo-website/app/code/local/M3/Cusdesign/controllers/Adminhtml/CusdesignController.php(15): M3_Cusdesign_Adminhtml_CusdesignController->_initAction()
#11 /home/webfolder/public_html/demo-website/app/code/core/Mage/Core/Controller/Varien/Action.php(418): M3_Cusdesign_Adminhtml_CusdesignController->indexAction()
#12 /home/webfolder/public_html/demo-website/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#13 /home/webfolder/public_html/demo-website/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#14 /home/webfolder/public_html/demo-website/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#15 /home/webfolder/public_html/demo-website/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#16 /home/webfolder/public_html/demo-website/index.php(73): Mage::run('', 'store')

used the block class ..

class M3_Cusdesign_Block_Cusdesign extends Mage_Core_Block_Template

in config file

 <blocks>
        <cusdesign>
            <class>M3_Cusdesign_Block</class>
        </cusdesign>
    </blocks>

my layout file

 <cusdesign_index_index>
    <reference name="content">
        <block type="cusdesign/cusdesign" name="cusdesign" template="cusdesign/cusdesign.phtml" />
    </reference>
</cusdesign_index_index>
0

Magento is looking for the following class and can't find it:

M3_Cusdesign_Block_Adminhtml_Cusdesign

Possible reasons:

  • the class is not in the right folder or the folder contains a typo it should be under app/code/<codePool>/M3/Cusdesign/Adminhtml/Cusdesign.php
  • the class name is wrong or contains a typo, it should be M3_Cusdesign_Block_Adminhtml_Cusdesign
  • my class is located app/code/local/M3/Cusdesign/Block/Adminhtml/Cusdesign.php with class name M3_Cusdesign_Block_Adminhtml_Cusdesign – lalit mohan May 21 '16 at 9:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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