Issue Type: Bug Created: 2008-01-17T07:55:38.000+0000 Last Updated: 2008-03-21T16:25:29.000+0000 Status: Resolved Fix version(s): - 1.5.0 (17/Mar/08)
Reporter: Luiz Damim (luizvd) Assignee: Ralph Schindler (ralph) Tags: - Zend_Controller
Related issues: Attachments:
When changing the default script path using Zend_Controller_Action_Helper_ViewRenderer::setViewBasePathSpec(), the placeholders :module, :controller and :action are not recognized by the inflector.
<pre class="literal"> $vr = $this->_helper->viewRenderer; $vr->setView($this->view) ->setViewBasePathSpec(':moduleDir/:module') ->initView();
Exception thrown: Fatal error: Uncaught exception 'Zend_Filter_Exception' with message 'A replacement identifier : was found inside the inflected target, perhaps a rule was not satisfied with a target source? Unsatisfied inflected target: /data/W/mvc.vilagenet.com.br/application/modules/:module' in /data/W/mvc.vilagenet.com.br/library/Zend/Filter/Inflector.php:454 Stack trace:
I´m using the snapshot ZendFramework-20080117-7469.
Posted by Carlton Gibson (carlton) on 2008-01-19T07:44:10.000+0000
I looked into this briefly. This is not a solution but a possible line of enquiry:
From r7089, in ViewRenderer::_getBasePath() an empty array is passed to the inflector's filter method:
[Lines 360 -363 : ViewRenderer::_getBasePath()] $inflector = $this->getInflector(); $this->_setInflectorTarget($this->getViewBasePathSpec()); $path = $inflector->filter(array()); return $path;
Should it not pass $this->_inflectorTarget instead?
Inflector::filter() begins with a foreach on the passed array, which isn't going to get very far if that is empty...
Posted by Matthew Weier O'Phinney (matthew) on 2008-02-04T15:31:00.000+0000
Assigning to Ralph
Posted by Matthew Weier O'Phinney (matthew) on 2008-02-14T11:22:34.000+0000
Upgrading status to must have for 1.5
Posted by Ralph Schindler (ralph) on 2008-02-19T15:20:34.000+0000
Please check revision 8177 for a fix.
Posted by Ralph Schindler (ralph) on 2008-02-20T08:56:25.000+0000
If there are any issues here, please reopen.
Have you found an issue?
See the Overview section for more details.