Hi Gilberto, 2012/3/29 gilbertoalbino <[email protected]>
> Hi there! > I'm testing ZF2 a "site" project here using the zend skeleton from github > and got to a weird situation. > > When I type a wrong address (http://mysite.localhost/site/this_is_wrong) > Zend throws an exception informing the missing 'not-found' file. > I spent a lot of time trying to figure out what the hell's was going on, > untill I placed a file "not-found.phtml' inside my module view folder and > got things working. > > I searched the souce code and found this: > > $routeMatch = $e->getRouteMatch(); > $controllerName = $routeMatch->getParam('controller', 'not-found'); > $events = $this->events(); > > inside "vendor/ZendFramework/library/Zend/MVC/Application" insdide the > dispatch method. > > I can't find a way to disable it by default. > > Any clue? > This is a known bug in the framework. I created an issue for this earlier, which you find here: http://framework.zend.com/issues/browse/ZF2-228 There is no real solution yet. At the moment, it is advised to put a not-found.phtml in every template directory you have. I think a solution will be found in the future before a stable zf2 is out, but for now it is the easiest solution. -- Jurian Sluiman
