Re: [fw-general] Re: Re[fw-general] comendation to solve problem with ZendJsonExprFinder in Zend_Json::encode()
hello mezoni, thanks for the report, i'll look into it. haven't thought about UTF-8 so much in the keys. On Sun, 11 Jan 2009 15:46:29 -0800 (PST), mezoni 819...@mail.ru wrote: These code will be passed to json_encode {modal:true,buttons:{Zend_Json_Expression_Index_0:Zend_Json_Expression_Value_0,Zend_Json_Expression_Index_1:Zend_Json_Expression_Value_1,Zend_Json_Expression_Index_2:Zend_Json_Expression_Value_2}} str_replace() work with this patterns fine. -- View this message in context: http://www.nabble.com/Recomendation-to-solve-problem-with-ZendJsonExprFinder-in-Zend_Json%3A%3Aencode%28%29-tp21405959p21406038.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] Create a MultiSelect from DB data where SQL Select's key is the value of an other Element.
Hi all. I have a form with 2 elements, say Nations and City, both get via SQL. No problem with Nations, but I don't understand how can I create the SELECT form element, for City, based on the Nations choice when I need to populate() the form (when I need to edit the previus entry data). M. -- Michel 'ZioBudda' Morelli mic...@ziobuddalabs.it Consulenza sistemistica in ambito OpenSource. Sviluppo applicazioni web dinamiche (LAMP+Ajax) Telefono: 0200619074 Telefono Cell: +39-3939890025 -- Fax: +39-0291390660 http://www.ziobudda.net ICQ: 58351764 http://www.ziobuddalabs.it Skype: zio_budda http://www.ajaxblog.it MSN: mic...@ziobuddalabs.it JABBER: mic...@gmail.com
[fw-general] contributing to Zend Search Lucene
Hi there, I'm currently working on a search function for my employer using Zend Search Lucene. The idea is to display search results in much the same way as Google/Nutch I've had to extend the existing ZSL code to be able to create 'snippets' (highlighted document fragments) with a fragmenter, and some (very small) changes to the highlighter. I was wondering if this would be of any use to the framework, or whether somebody is already working on this. I've noticed quite a few people asking for this kind of functionality on the net. Thanks Matt Pearson Internet Solutions Developer Liz Earle Beauty Co. 01983 813884 Work with the environment... think before you print Liz Earle Naturally Active Skincare The Green House Ryde IOW PO33 1BD Telephone +44 (0)1983 813913. Fax +44 (0)1983 813912. Email naturallyact...@lizearle.com mailto:naturallyact...@lizearle.com Web www.lizearle.com http://www.lizearle.com Liz Earle Naturally Active Skincare is a trading name of Liz Earle Beauty Co. Limited. Registered in England No. 3070395 Registered address: 8-10 New Fetter Lane London EC4A 1RS.
[fw-general] Enable preg_match unicode support
Hi, I see this @preg_match('/\pL/u', 'a') code is used in Zend/Filter/Alpha.php to determine if unicode support enabled or not. Can anyone tell me how to actually enable it so it is supported? I get enabled on one system and not in other but can't figure out what configuration is or difference. Cheers
[fw-general] How to render formSubmit element without name attrib?
Any idea? Thx. -- View this message in context: http://www.nabble.com/How-to-render-formSubmit-element-without-name-attrib--tp21411694p21411694.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] How to render formSubmit element without name attrib?
Well, i want to render Search form such as: class Form_File_Search extends Zend_Form { public function init() { $this-setMethod(Zend_Form::METHOD_GET) -setElementFilters(array('StringTrim')) -setAttrib('id', 'fileSearchForm'); $file = $this-createElement('text', 'q', array('maxlength' = 31, 'size' = 30)) -setLabel('Filename') -setRequired(true); $submit = $this-createElement('submit', 'submit', array('id' = 'myId')) -setIgnore(true) -setValue('search'); $this-addElements(array($file, $submit)) -setElementDecorators(array('ViewHelper', 'Errors', 'Label')) -setDecorators(array('FormElements', array('HtmlTag', array('tag' = 'div')), 'Form')); $submit-setDecorators(array('ViewHelper')); } } And i dont want the rendered submit button has the name attribute atay wrote: maybe You'll write more details ? Václav Vaník wrote: Any idea? Thx. -- View this message in context: http://www.nabble.com/How-to-render-formSubmit-element-without-name-attrib--tp21411694p21412089.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] test message - please ignore 1050GMT
http://www.zend.com David Lowes Systems Administrator Zend Technologies, Ltd. t. +972.3.753.9560 www.zend.com image001.gif
[fw-general] Test message - please ignore 1053GMT
Test message - please ignore 1053GMT
[fw-general] Test message - please ignore 1302GMT
Test message - please ignore 1302GMT
[fw-general] Re: Re: Re[fw-general] comendation to solve problem with ZendJsonExprFinder in Zend_Json::encode()
Hello, Benjamin! Problem not in keys. Problem with UTF. Expression may also have contain UTF chars. json_encode encode UTF chars in both keys and expression. I have question for you. Why ZendExprFIndExpr feature enabled by default? This will decrease overall performance where this not realy need. Why don't turn off this by default? By eg. class ZendJson { public static function encode($valueToEncode, $cycleCheck = false, $options = array()) { if(isset($options['enableJsonFindExpr']) $options['enableJsonFindExpr'] == true) { // here we enable pre-processing js expressions } } class ZendJsonExpr { public static function encode($valueToEncode, $cycleCheck = false, $options = array()) { // turn this option on $options['enableJsonFindExpr'] == true; return ZendJson::encode($valueToEncode, $cycleCheck, $options); } } Simple replace code form ZendJson::encode($value); to ZendJsonExpr::encode($value); in components that realy need this feature. By e.g. in ZendX_Jquery components. -- View this message in context: http://www.nabble.com/Recomendation-to-solve-problem-with-ZendJsonExprFinder-in-Zend_Json%3A%3Aencode%28%29-tp21405959p21412476.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] contributing to Zend Search Lucene
Hello Matt, this sounds like a great addition. You should make an SVN diff of all your changes and put it into a Patch Issue into the ZF Jira Issue Tracker. Additionally you should provide unit-tests for your changes and make sure that old functionality is not broken. Post all this attachments into your jira issue and post the link back into this issue to get people voting for it. This should generate some momentum for it to be included in one of the next versions. greetings, Benjamin On Mon, 12 Jan 2009 09:12:06 -, Matt Pearson mpear...@lizearle.com wrote: Hi there, I'm currently working on a search function for my employer using Zend Search Lucene. The idea is to display search results in much the same way as Google/Nutch I've had to extend the existing ZSL code to be able to create 'snippets' (highlighted document fragments) with a fragmenter, and some (very small) changes to the highlighter. I was wondering if this would be of any use to the framework, or whether somebody is already working on this. I've noticed quite a few people asking for this kind of functionality on the net. Thanks Matt Pearson Internet Solutions Developer Liz Earle Beauty Co. 01983 813884 Work with the environment... think before you print Liz Earle Naturally Active Skincare The Green House Ryde IOW PO33 1BD Telephone +44 (0)1983 813913. Fax +44 (0)1983 813912. Email naturallyact...@lizearle.com mailto:naturallyact...@lizearle.com Web www.lizearle.com http://www.lizearle.com Liz Earle Naturally Active Skincare is a trading name of Liz Earle Beauty Co. Limited. Registered in England No. 3070395 Registered address: 8-10 New Fetter Lane London EC4A 1RS.
Re: [fw-general] How to render formSubmit element without name attrib?
Don't think you can. Unles you write your own Zend View Submit. And remove the name attrib. class Zend_View_Helper_FormSubmit extends Zend_View_Helper_FormElement { public function formSubmit($name, $value = null, $attribs = null) { $info = $this-_getInfo($name, $value, $attribs); extract($info); // name, value, attribs, options, listsep, disable // check if disabled $disabled = ''; if ($disable) { $disabled = ' disabled=disabled'; } // XHTML or HTML end tag? $endTag = ' /'; if (($this-view instanceof Zend_View_Abstract) !$this-view-doctype()-isXhtml()) { $endTag= ''; } // Render the button. $xhtml = 'input type=submit' . ' name=' . $this-view-escape($name) . '' . ' id=' . $this-view-escape($id) . '' . ' value=' . $this-view-escape($value) . '' . $disabled . $this-_htmlAttribs($attribs) . $endTag; return $xhtml; } } - visit my website at http://www.phpscriptor.com/ http://www.phpscriptor.com/ -- View this message in context: http://www.nabble.com/How-to-render-formSubmit-element-without-name-attrib--tp21411694p21412968.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] How to render formSubmit element without name attrib?
Damn, you are right ;-) Thx. PHPScriptor wrote: Don't think you can. Unles you write your own Zend View Submit. And remove the name attrib. class Zend_View_Helper_FormSubmit extends Zend_View_Helper_FormElement { public function formSubmit($name, $value = null, $attribs = null) { $info = $this-_getInfo($name, $value, $attribs); extract($info); // name, value, attribs, options, listsep, disable // check if disabled $disabled = ''; if ($disable) { $disabled = ' disabled=disabled'; } // XHTML or HTML end tag? $endTag = ' /'; if (($this-view instanceof Zend_View_Abstract) !$this-view-doctype()-isXhtml()) { $endTag= ''; } // Render the button. $xhtml = 'input type=submit' . ' name=' . $this-view-escape($name) . '' . ' id=' . $this-view-escape($id) . '' . ' value=' . $this-view-escape($value) . '' . $disabled . $this-_htmlAttribs($attribs) . $endTag; return $xhtml; } } -- View this message in context: http://www.nabble.com/How-to-render-formSubmit-element-without-name-attrib--tp21411694p21413318.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Zend PDT 2.0 all-in-one available (BETA)
I tried the new PDT 2.0. It is right - there is a source formatter. But it only intends and replaces tabs with spaces or vice versa. But there are no advanced settings possible like braces policy, indentation, etc. like in Zend Studio (of course). My question now to those who use PDT Eclipse: How do you format your PHP Source Code more detailed - According to a coding style like the Zend Framework Style? We use PHP_CodeSniffer to detect Coding Style Violations. But is there a tool out there which formats the source code according to a coding style? Is PHP_Beautifer the right tool for me? - I can't see any advanced settings possibilities either in its documentation. I appreciate any tipps or suggestions. Best regards Tom On Thu, Nov 6, 2008 at 11:02 AM, Robert Castley robert.cast...@macro4.comwrote: A bit off-list but those Zend guys have packaged an all-in-one build of the latest PDT 2.0 and Eclipse 3.4. http://downloads.zend.com/pdt/all-in-one/ Had a quick play and the hot-spots for me are: 1) Javascript editor and source formatter included :-) 2) It's quicker 3) Seems stable so far This is great that they have released this as it means you no longer need to build it yourself :-) - Robert This email has been scanned for all known viruses by the MessageLabs Email Security Service and the Macro 4 plc internal virus protection system.
[fw-general] Zend_Auth default storage blocking Ajax requests
Hi, I think this is my problem (well Google says it is!), because Zend_Auth uses sessions for storage it prevents multiple Ajax requests from firing. The just get processed sequentially. I assume this is something to do with PHP and the way it allows access to sessions. As soon as I remove reference to Zend_Auth each request flys through. Is there anyway I can use Zend_Auth without it blocking up my pipe? Cheers, - Robert This email has been scanned for all known viruses by the MessageLabs Email Security Service and the Macro 4 plc internal virus protection system.
[fw-general] Modules, user module and Zend_Auth
Hi all. I'm creating a web site, and I have split the site in more modules. One for the frontend, one for the admin, one for the user, etc etc. Now I have a problem while setting Layout. This is my code (in a plugin): public function dispatchLoopStartup(Zend_Controller_Request_Abstract $request) { $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer'); $viewRenderer-init(); $view = $viewRenderer-view; //-- START -- $frontController = Zend_Controller_Front::getInstance(); $routes = array(); $routes['user'] = new Zend_Controller_Router_Route('user/:controller/:action/*', array('module' = 'user', 'controller' = 'auth', 'action' = 'index')); $router = new Zend_Controller_Router_Rewrite(); $router-addRoutes($routes); $frontController-setRouter($router); //-- END -- $layout = Zend_Layout::getMvcInstance(); $auth = Zend_Auth::getInstance(); //$layout-setLayout(layout); //return; if($auth-hasIdentity()) { $layout-setLayout('loggedIn'); $view-headLink()-appendStylesheet($view-baseUrl().'/css/style.css'); } else { $layout-setLayout(layout); } } //END PLUGIN Note the piece of code content from START to END. With this code all works, but if I comment those lines Zend Framework give me this error: /Zend_Controller_Router_Exception: Route user is not defined in {MY_PATH}/library/ZendFramework-1.7.2-minimal/library/Zend/Controller/Router/Rewrite.php on line 250/ / /Why this ? Where is my problem ? Tnx for all. M. -- Michel 'ZioBudda' Morelli mic...@ziobuddalabs.it Consulenza sistemistica in ambito OpenSource. Sviluppo applicazioni web dinamiche (LAMP+Ajax) Telefono: 0200619074 Telefono Cell: +39-3939890025 -- Fax: +39-0291390660 http://www.ziobudda.net ICQ: 58351764 http://www.ziobuddalabs.it Skype: zio_budda http://www.ajaxblog.it MSN: mic...@ziobuddalabs.it JABBER: mic...@gmail.com
Re: [fw-general] Modules, user module and Zend_Auth
dispatchLoopStartup happens after routing so the route you add is never really there. use routeStartup 2009/1/12 Michel Morelli mic...@ziobuddalabs.it: Hi all. I'm creating a web site, and I have split the site in more modules. One for the frontend, one for the admin, one for the user, etc etc. Now I have a problem while setting Layout. This is my code (in a plugin): public function dispatchLoopStartup(Zend_Controller_Request_Abstract $request) { $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer'); $viewRenderer-init(); $view = $viewRenderer-view; //-- START -- $frontController = Zend_Controller_Front::getInstance(); $routes = array(); $routes['user'] = new Zend_Controller_Router_Route('user/:controller/:action/*', array('module' = 'user', 'controller' = 'auth', 'action' = 'index')); $router = new Zend_Controller_Router_Rewrite(); $router-addRoutes($routes); $frontController-setRouter($router); //-- END -- $layout = Zend_Layout::getMvcInstance(); $auth = Zend_Auth::getInstance(); //$layout-setLayout(layout); //return; if($auth-hasIdentity()) { $layout-setLayout('loggedIn'); $view-headLink()-appendStylesheet($view-baseUrl().'/css/style.css'); } else { $layout-setLayout(layout); } } //END PLUGIN Note the piece of code content from START to END. With this code all works, but if I comment those lines Zend Framework give me this error: Zend_Controller_Router_Exception: Route user is not defined in {MY_PATH}/library/ZendFramework-1.7.2-minimal/library/Zend/Controller/Router/Rewrite.php on line 250 Why this ? Where is my problem ? Tnx for all. M. -- Michel 'ZioBudda' Morelli mic...@ziobuddalabs.it Consulenza sistemistica in ambito OpenSource. Sviluppo applicazioni web dinamiche (LAMP+Ajax) Telefono: 0200619074 Telefono Cell: +39-3939890025 -- Fax: +39-0291390660 http://www.ziobudda.net ICQ: 58351764 http://www.ziobuddalabs.it Skype: zio_budda http://www.ajaxblog.itMSN: mic...@ziobuddalabs.it JABBER: mic...@gmail.com -- -- [MuTe] --
[fw-general] Url Helper on Routed Page
hi, I am having a problem with generating Urls using the URL view helper, on a page which is using the router. I have a router setup as this: $router-addRoute('profile',new Zend_Controller_Router_Route('profile/:username',array('module'='default','controller' = 'profile','action' = 'index'))); This means that visiting: http://mysite/profile/anyusername Will work the same as: http://mysite/profile/index/username/anyusername The problem I have is that any url generated with the url view helper e.g. $this-url(array('module'='default','controller'='login','action'='index'); Will not work, and the url I get instead is: http://mysite/profile/anyusername Please can someone help with this issue. Thanks in advance -- View this message in context: http://www.nabble.com/Url-Helper-on-Routed-Page-tp21416339p21416339.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] Zend_Controller_Dispatcher_Exception: Invalid controller specified (error)
I'm using ZF 1.6.0 and I'm trying to get Zend_Test_PHPUnit_ControllerTestCase to work. I've mostly gotten it, but when I try to call dispatch(), I get the following error: Zend_Controller_Dispatcher_Exception: Invalid controller specified (error) Here's what my code looks like: class UserControllerTest extends Zend_Test_PHPUnit_ControllerTestCase { public function setUp() { $this-bootstrap = array($this, 'appBootstrap'); parent::setUp(); } public function appBootstrap() { $this-frontController-registerPlugin(new Initializer('test')); } public function testWhatever() { $this-dispatch('connector/index'); } } I guess when it says Invalid controller specified (error), it thinks that I'm trying to run a controller called error. Even if my controller dir isn't set properly, why would it get the controller name wrong? Also, does anyone know where I can find some good, complete examples using Zend_Test_PHPUnit_ControllerTestCase? Thanks, Jason -- View this message in context: http://www.nabble.com/Zend_Controller_Dispatcher_Exception%3A-Invalid-controller-specified-%28error%29-tp21417721p21417721.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Zend_Controller_Dispatcher_Exception: Invalid controller specified (error)
-- jasonswett jason.sw...@gmail.com wrote (on Monday, 12 January 2009, 08:20 AM -0800): I'm using ZF 1.6.0 and I'm trying to get Zend_Test_PHPUnit_ControllerTestCase to work. I've mostly gotten it, but when I try to call dispatch(), I get the following error: Zend_Controller_Dispatcher_Exception: Invalid controller specified (error) Here's what my code looks like: class UserControllerTest extends Zend_Test_PHPUnit_ControllerTestCase { public function setUp() { $this-bootstrap = array($this, 'appBootstrap'); parent::setUp(); } public function appBootstrap() { $this-frontController-registerPlugin(new Initializer('test')); } public function testWhatever() { $this-dispatch('connector/index'); Use a leading slash: $this-dispatch('/connector/index'); dispatch() is passing the argument as a URL to the request object, so it should look like a URL (though it doesn't require the schema, hostname and/or port). } } I guess when it says Invalid controller specified (error), it thinks that I'm trying to run a controller called error. Even if my controller dir isn't set properly, why would it get the controller name wrong? Also, does anyone know where I can find some good, complete examples using Zend_Test_PHPUnit_ControllerTestCase? Thanks, Jason -- View this message in context: http://www.nabble.com/Zend_Controller_Dispatcher_Exception%3A-Invalid-controller-specified-%28error%29-tp21417721p21417721.html Sent from the Zend Framework mailing list archive at Nabble.com. -- Matthew Weier O'Phinney Software Architect | matt...@zend.com Zend Framework | http://framework.zend.com/
Re: [fw-general] Zend_Controller_Dispatcher_Exception: Invalid controller specified (error)
Matthew Weier O'Phinney-3 wrote: -- jasonswett jason.sw...@gmail.com wrote (on Monday, 12 January 2009, 08:20 AM -0800): I'm using ZF 1.6.0 and I'm trying to get Zend_Test_PHPUnit_ControllerTestCase to work. I've mostly gotten it, but when I try to call dispatch(), I get the following error: Zend_Controller_Dispatcher_Exception: Invalid controller specified (error) Here's what my code looks like: class UserControllerTest extends Zend_Test_PHPUnit_ControllerTestCase { public function setUp() { $this-bootstrap = array($this, 'appBootstrap'); parent::setUp(); } public function appBootstrap() { $this-frontController-registerPlugin(new Initializer('test')); } public function testWhatever() { $this-dispatch('connector/index'); Use a leading slash: $this-dispatch('/connector/index'); dispatch() is passing the argument as a URL to the request object, so it should look like a URL (though it doesn't require the schema, hostname and/or port). } } I guess when it says Invalid controller specified (error), it thinks that I'm trying to run a controller called error. Even if my controller dir isn't set properly, why would it get the controller name wrong? Also, does anyone know where I can find some good, complete examples using Zend_Test_PHPUnit_ControllerTestCase? Thanks, Jason -- View this message in context: http://www.nabble.com/Zend_Controller_Dispatcher_Exception%3A-Invalid-controller-specified-%28error%29-tp21417721p21417721.html Sent from the Zend Framework mailing list archive at Nabble.com. -- Matthew Weier O'Phinney Software Architect | matt...@zend.com Zend Framework | http://framework.zend.com/ Thanks for the reply. When I add a leading slash, I still get the exact same error, though. -- View this message in context: http://www.nabble.com/Zend_Controller_Dispatcher_Exception%3A-Invalid-controller-specified-%28error%29-tp21417721p21418302.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Enable preg_match unicode support
Hi Julian, The support isn't influenced by PHP, rather it depends on how the PCRE library was compiled that PHP is compiled against. A lot of older systems have PCRE compiled without Unicode support (for reasons known only to themselves). Where the support is not available, you may need to compile the PCRE library correctly and run a new PHP version compile off that. Perhaps your system has a corrected update available from an update repo? Paddy Julian Davchev wrote: Hi, I see this @preg_match('/\pL/u', 'a') code is used in Zend/Filter/Alpha.php to determine if unicode support enabled or not. Can anyone tell me how to actually enable it so it is supported? I get enabled on one system and not in other but can't figure out what configuration is or difference. Cheers - Pádraic Brady Blog: http://blog.astrumfutura.com Free Zend Framework Book: http://www.survivethedeepend.com OpenID Europe Foundation - Irish Representative -- View this message in context: http://www.nabble.com/Enable-preg_match-unicode-support-tp21411573p21419343.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Re: Re: Re[fw-general] comendation to solve problem with ZendJsonExprFinder in Zend_Json::encode()
-- mezoni 819...@mail.ru wrote (on Monday, 12 January 2009, 03:09 AM -0800): Problem not in keys. Problem with UTF. Expression may also have contain UTF chars. json_encode encode UTF chars in both keys and expression. I have question for you. Why ZendExprFIndExpr feature enabled by default? This will decrease overall performance where this not realy need. Why don't turn off this by default? Agreed -- Ben, turning this on by default would be a BC break; it should only be turned on if the user needs it. By eg. class ZendJson { public static function encode($valueToEncode, $cycleCheck = false, $options = array()) { if(isset($options['enableJsonFindExpr']) $options['enableJsonFindExpr'] == true) { // here we enable pre-processing js expressions } } class ZendJsonExpr { public static function encode($valueToEncode, $cycleCheck = false, $options = array()) { // turn this option on $options['enableJsonFindExpr'] == true; return ZendJson::encode($valueToEncode, $cycleCheck, $options); } } Simple replace code form ZendJson::encode($value); to ZendJsonExpr::encode($value); in components that realy need this feature. By e.g. in ZendX_Jquery components. -- View this message in context: http://www.nabble.com/Recomendation-to-solve-problem-with-ZendJsonExprFinder-in-Zend_Json%3A%3Aencode%28%29-tp21405959p21412476.html Sent from the Zend Framework mailing list archive at Nabble.com. -- Matthew Weier O'Phinney Software Architect | matt...@zend.com Zend Framework | http://framework.zend.com/
[fw-general] Jquery AjaxLink HTML validation
in the class ZendX_JQuery_View_Helper_AjaxLink around line 282 there is some code like this: $html = 'a' . $this-_htmlAttribs($attribs) // . $this-getClosingBracket() . '' . $label . ' '; I've had to comment out the line getting the closing bracket because the page will fail html validation with it. Although my page is xhtml, i don't want / as the closing bracket because the a element needs to remain open until the tag. I'm a bit stumped as to what i've done wrong, and don't really want to leave the hack in my ZendX library. Thanks for any help, Will -- View this message in context: http://www.nabble.com/Jquery-AjaxLink-HTML-validation-tp21427071p21427071.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Zend_Controller_Dispatcher_Exception: Invalid controller specified (error)
To get the actual error, turn off the error handler and make the front controller throw exceptions. Zend_Controller_Front::getInstance()-setParam('noErrorHandler', true)-throwExceptions(true); -- Mon On Tue, Jan 13, 2009 at 12:46 AM, jasonswett jason.sw...@gmail.com wrote: Matthew Weier O'Phinney-3 wrote: -- jasonswett jason.sw...@gmail.com wrote (on Monday, 12 January 2009, 08:20 AM -0800): I'm using ZF 1.6.0 and I'm trying to get Zend_Test_PHPUnit_ControllerTestCase to work. I've mostly gotten it, but when I try to call dispatch(), I get the following error: Zend_Controller_Dispatcher_Exception: Invalid controller specified (error) Here's what my code looks like: class UserControllerTest extends Zend_Test_PHPUnit_ControllerTestCase { public function setUp() { $this-bootstrap = array($this, 'appBootstrap'); parent::setUp(); } public function appBootstrap() { $this-frontController-registerPlugin(new Initializer('test')); } public function testWhatever() { $this-dispatch('connector/index'); Use a leading slash: $this-dispatch('/connector/index'); dispatch() is passing the argument as a URL to the request object, so it should look like a URL (though it doesn't require the schema, hostname and/or port). } } I guess when it says Invalid controller specified (error), it thinks that I'm trying to run a controller called error. Even if my controller dir isn't set properly, why would it get the controller name wrong? Also, does anyone know where I can find some good, complete examples using Zend_Test_PHPUnit_ControllerTestCase? Thanks, Jason -- View this message in context: http://www.nabble.com/Zend_Controller_Dispatcher_Exception%3A-Invalid-controller-specified-%28error%29-tp21417721p21417721.html Sent from the Zend Framework mailing list archive at Nabble.com. -- Matthew Weier O'Phinney Software Architect | matt...@zend.com Zend Framework | http://framework.zend.com/ Thanks for the reply. When I add a leading slash, I still get the exact same error, though. -- View this message in context: http://www.nabble.com/Zend_Controller_Dispatcher_Exception%3A-Invalid-controller-specified-%28error%29-tp21417721p21418302.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Zend_Controller_Dispatcher_Exception: Invalid controller specified (error)
That worked, thanks. Mon Zafra wrote: To get the actual error, turn off the error handler and make the front controller throw exceptions. Zend_Controller_Front::getInstance()-setParam('noErrorHandler', true)-throwExceptions(true); -- Mon -- View this message in context: http://www.nabble.com/Zend_Controller_Dispatcher_Exception%3A-Invalid-controller-specified-%28error%29-tp21417721p21428243.html Sent from the Zend Framework mailing list archive at Nabble.com.