When I hit my module on this url http://localhost/xxx/index.php/TradeEnquiry I get this error
Fatal error: Call to a member function setFormAction() on a non-object in C:\wamp\www\stockdisplays\app\code\local\Stock\Tradeenquiry\controllers\IndexController.php on line 55
Line 55 is this:
$this->getLayout()->getBlock('tradeenquiryView')
->setFormAction( Mage::getUrl('*/*/post') );
this is a fragment from my layout xml:
<default>
<reference name="footer_links">
<action method="addLink" translate="label title" module="tradeenquiry">
<label>Trade Enquiry</label>
<url>tradeenquiry</url>
<title>Trade Enquiry</title>
<prepare>true</prepare>
</action>
</reference>
</default>
<tradeenquiry_index_index>
<reference name="root">
<action method="setTemplate"><template>page/2columns-right.phtml</template></action>
<action method="setHeaderTitle" translate="title" module="tradeenquiry"><title>Trade Enquiry</title></action>
</reference>
<reference name="content">
<block type="core/template" name="tradeenquiryView" template="tradeenquiry/view.phtml"/>
</reference>
</tradeenquiry_index_index>
I dont get what the problem is? the block is correctly named 'tradeenquiryView'. The only thing I can think of is that the layout xml is cached somehow? As I have to hit the module on /TradeEnquiry and not /tradeenquiry like I have stated in my layout xml, so its almost as if its using an older version?