Try the Demo

Magento Forum

   
Error in overriding Mage_Contacts_IndexController
 
Anshu_Mishra
Sr. Member
 
Total Posts:  96
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:  2168
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.

 Signature 

http://marius-strajeru.blogspot.com/
Check out the Ultimate Module Creator:
on magento connect
on github

 
Magento Community Magento Community
Magento Community
Magento Community
 
Anshu_Mishra
Sr. Member
 
Total Posts:  96
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