2011-04-19 8 views
1

주문을하려고 할 때 배송 방법을 선택할 때치명적 오류 : 비 객체에서 setTitle() 멤버 함수를 호출하십시오.

Fatal error: Call to a member function setTitle() on a non-object in /home/exclus31/public_html/../../../app/code/core/Mage/Customer/Block/Form/Login.php on line 40 

하지만 주문시 문제가 없으며 특정 주문에 대한 확인 메시지가 표시됩니다.

이 오류가 표시된 이유와 해결책을 알고있는 사람은 누구입니까?

+0

버전을 도움이되기를 바랍니다? –

+0

나는 그것이 ../../../의 사용과 관련이 있다고 느낍니다. –

답변

4

이 오류도있었습니다. 레이아웃을로드하기 전에 에 getLayout()을 호출했기 때문입니다. 그냥과 같이 먼저 loadLayout() 전화 :

public function IndexAction() { 
    $this->loadLayout(); // do this first 
    $this->getLayout()->getBlock('head')->setTitle($this->__('My Title')); // then this works 
    $this->renderLayout(); // render as usual 
} 

을 나는이 젠토의

관련 문제