ZF-6193: contextSwitch does not fire for camel cased actions

Issue Type: Bug Created: 2009-04-02T10:19:16.000+0000 Last Updated: 2009-04-02T10:38:55.000+0000 Status: Resolved Fix version(s): Reporter: Kenrick Buchanan (nsbucky) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Controller

Related issues: Attachments:


$ajaxContext = $this->_helper->getHelper('AjaxContext'); $ajaxContext->setAutoJsonSerialization(false) ->addActionContext('fieldSearch', 'json') // json context will not be called ->addActionContext('getfield', 'json') // json context will be called ->initContext();

function fieldSearchAction() {...} function getfieldAction(){}

If I use a camel cased action name with context, it always just asks for the .phtml version, and never the json. Changing the name appears to fix this.


Posted by Matthew Weier O'Phinney (matthew) on 2009-04-02T10:38:37.000+0000

Don't use camelCasing when specifying actions; use the action name as it would be represented in the URL and thus request object: 'field-search'.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.