Magento Forum

   
Error in overriding Mage_Contacts_IndexController
 
Anshu Mishra
Sr. Member
 
Total Posts:  101
Joined:  2012-04-23
India
 

While overriding Mage_Contacts_IndexController, i am getting the following error message

Call to a member function setFormAction() on a non-object

please help me to fix this issue

Thanks in advance

 
Magento Community Magento Community
Magento Community
Magento Community
 
tzyganu
Mentor
 
Avatar
Total Posts:  2205
Joined:  2009-11-18
Bucharest, Romania
 

Hello
How did you rewrite the controller?
You get this error because there is no block named ‘contactForm’ in your layout.

$this->getLayout()->getBlock('contactForm')
            ->
setFormActionMage::getUrl('*/*/post') );

Marius.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Anshu Mishra
Sr. Member
 
Total Posts:  101
Joined:  2012-04-23
India
 

Thanks

I have fixed the issue. grin

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top