ZF-9951: ZendX_JQuery_Controller_Action_Helper_AutoComplete sets a bad content for the reponse

Issue Type: Bug Created: 2010-06-06T09:58:19.000+0000 Last Updated: 2012-11-20T21:37:46.000+0000 Status: Open Fix version(s): Reporter: Doron Gutman (gshockoman) Assignee: None Tags: - ZendX_JQuery

Related issues: Attachments: - fix_bug.diff


Consider the following action method used for autocomplete source:

<pre class="literal"> 
public function getTagsAction() {
        new ZendX_JQuery_Controller_Action_Helper_AutoComplete()
    $this->_helper->autoComplete(array('test', 'testing', 'tester', 'tests', 'i am testing'));

The response of such a call will have each item of the array in its own line (see ZendX_JQuery_Controller_Action_Helper_AutoComplete::prepareAutoCompletion()), where according to the example here: the response should be a json array of strings, or json array of json objects. For example:

<pre class="literal">
[{'id':'111', 'label':'test'}, {'id':'222', 'label':'testing'}, {'id':'333', 'label':'tester'}, {'id':'444', 'label':'tests'}, {'id':'555', 'label':'i am testing'}]


Posted by Daniel Getelman (dget) on 2010-06-17T21:02:09.000+0000

This is an admittedly hacky attempt at a patch, but it did the job for my simple needs, and could be a good start towards a fuller solution. I'm assuming this had to do with the new version of JQuery/UI.

Posted by Daniel Getelman (dget) on 2010-06-18T10:21:18.000+0000

Following up again:

It appears that this autocomplete works for the JQuery plugin (, but not for the Autocomplete now bundled with JQuery UI. It might be advisable to either make this an option, either as a new action helper or as a flag put in.

Have you found an issue?

See the Overview section for more details.


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

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