changing __construct() to init() solved my first problem, thanks..
The Routing Problem:
My dirs:
|/application
/models
/views
/controllers
/httpdocs
/images
/styles
.htaccess
index.php
/library
/Zend|
Real url: http://192.168.0.99/entwicklung/trunk/httpdocs/
In my bootstrap:
Thanks, this works...
i could swear i testet this before like this...
Lee Saferite schrieb:
Well, The error message seems fairly self explanitory. Try using a
fully qualified path name.
$base = dirname(dirname(__FILE__));
$controller-setControllerDirectory($base .
Hello,
I have to problems after upgrading to 0.6.0:
-Fatal error: Call to a member function getParam() on a non-object
in /var/www/entwicklung/trunk/library/Zend/Controller/Action.php on line 302
Source Code:
$zielgruppe_id = $this-_getParam('id');
-The Main
Hi Lindemann
The '_getParam' method was used previously to retrieve request
variables from the dispatcher token. However, you've now got a
request object that takes care of that instead.
Try:-
$request = $this-getRequest();
$id = $request-id;
...from inside your action.
Source Code:
Actually, a call to $this-_getParam('id') gets translated into
$this-getRequest()-getParam('id') in the Action class. So, his code
'should' work. It seems that the internal call to getRequest() is not
returning a valid object.
The source code provided is insufficient to diagnose the problem.
I know this has been covered before, but as a reminder to people upgrading
to the new MVC code:
If your old controller code used __construct() to setup you controller, you
either need to move that code into a function called init() or fix your
constructor code to allow for the passing of
I had the same issue with the request object not being passed to the action
on first migration. Changing the constructor to init() fixed the issue.
class IndexController extends Zend_Controller_Action
{
public function __construct()
{...}
public function viewAction()