Issue Type: Bug Created: 2009-05-08T17:19:28.000+0000 Last Updated: 2009-10-16T23:31:15.000+0000 Status: Resolved Fix version(s): - 1.10.0 (27/Jan/10)
Reporter: Martin (lsv) Assignee: Ralph Schindler (ralph) Tags: - Zend_Tool
Related issues: Attachments:
Im trying to create a action in IndexController via zf.bat - but somehow it doesnt work. It works fine when I create actions in an another controller.
The project is created with d:\path\to\zf.bat create project . (from the directory where I want it to be created) Worked perfectly.
Then I copied zf.bat and zf.php to the directory (so I didnt have to type d:/path/to/zf.bat anymore. Now I created a new controller, and added some actions with zf.bat create controller User zf.bat create action login User zf.bat create action logout User (and some more)
Then I tried to create some new actions in indexController zf.bat create action send Index Then this error came
PHP Fatal error: Call to a member function search() on a non-object in ...\Zend\Tool\Project\Provider\Action.php on line 85 Fatal error: Call to a member function search() on a non-object in ...\Zend\Tool\Project\Provider\Action.php on line 85
Then I tried to create another action with a name which worked perfectly in my userController zf.bat create action login Index same error
Posted by Jan Juricek (pog) on 2009-05-30T09:15:17.000+0000
Hi. This behaviour occurs when you're trying to add an action to unknown controller.
Try to use this command (with small I letter in controller name):
zf.bat create action send index
It should work.
$controllerFile = self::_getControllerFileResource($profile, $controllerName, $moduleName);
now, when you specify unknown controller, it returns false, as defined in Zend_Tool_Project_Profile_Resource_Container::find(). It should definitely either throw a warning, if the $controllerFile === false saying it's case sensitive, maybe explain it a little bit. Maybe it could be good to try to lower the first letter in the find() function before giving up the controller search...
Posted by Martin (lsv) on 2009-06-02T07:11:37.000+0000
Actually i have switched to zf.sh, and in the controller help, there stands you shouldnt add controller name if you are adding actions to the index controller. Im not sure if this also stands in the zf.bat file.
But yes, a bit nicer error would be a great addition.
Also in zf.sh, it works with both lower- and uppercase controller name / action names...
Posted by Ralph Schindler (ralph) on 2009-10-16T23:31:14.000+0000
This has been fixed in part with other issues affecting the controller & view providers: ZF-7960, ZF-7956, ZF-7098, ZF-7276 ZF-6787
This will be included in the 1.10 release.
Have you found an issue?
See the Overview section for more details.