Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-15-2007, 07:46 PM
Junior Member
 
Join Date: Jul 2007
Posts: 1
Default Actions are looking for view scripts

Greetings,

I am getting some unexpected results from my controller(s).

I have a controller called 'LenderController'. It contains the indexAction and a loginAction.
If I go to http://myserver/lender, I get the expected rendering of the indexAction. However, if I go to http://myserver/lender/login, I get the following message:


Fatal error: Uncaught exception 'Zend_View_Exception' with message 'script 'lender/login.phtml' not found in path (/usr/local/lib/php/application/views/scripts/)' in /usr/local/lib/php/Zend/View/Abstract.php:856


Clearly it is expecting a login.phtml file.

What am I doing wrong?

Here's the controller in question, but this applies to all my controllers, even the IndexController:
PHP Code:
class LenderController extends Zend_Controller_Action
{
    public function 
init()
    {
        
$this->view->cssPath $this->_request->getBaseUrl() . '/css/';
    }

    public function 
indexAction()
    {
        
$this->view->title 'Your Mom\'s Bank - Lender Area';
    }

    public function 
loginAction()
    {
        echo 
"loginaction";
    }

THANKS!
-sh
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 07-18-2007, 08:14 AM
Junior Member
 
Join Date: Jul 2007
Posts: 5
Default

Hi,
try this:

go to the directory "/application/views/scripts/lender/" (if the directory lender does not exists, create it) and create here the file called "login.phtml":

login.phtml
HTML Code:
this is login page
And modify your LenderController loginAction() e.g. like this:

PHP Code:
public function loginAction()
{

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-20-2007, 11:54 PM
SpotSec's Avatar
Senior Member
 
Join Date: Feb 2007
Location: United States
Posts: 121
Default

SpotSec Networks - What is Zend Framework View Exception error.phtml?
__________________
Zym Framework - A Zend Framework extension library w/ demo app

SpotSec Blog:
http://spotsec.com/blog
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 10:22 PM.