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


$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.


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'.