Search plugin autocomplete with sub-sites

Questions, Tips & Tricks, HowTo's, ...
Post Reply
Posts: 7
Joined: Fri Jul 22, 2011 9:28 am

Search plugin autocomplete with sub-sites

Post by robwhittle81 » Sun Jul 24, 2011 11:11 pm


I've recently installed the search plugin which works really well. One small problem I'm having is that search results are duplicated in the autocomplete if you have a sub site.

For example, if I search for 'event' the autocomplete function generates:


From what I can see changing line 152 of /plugins/SearchPhp/controllers/FrontendController.php from:

if (count($validHits) > 0 and !in_array(array("q" => $t), $suggestions)) {


if (count($validHits) > 0 and !in_array($t, $suggestions)) {

Solves the problem and gives a distinct set of autocomplete results. Could this be changed in the plugin? Would this cause any issues?

Great job with Pimcore guys - this really is an amazing piece of work..



User avatar
Posts: 11
Joined: Tue Apr 07, 2015 9:00 pm
Location: Russia, Moscow

Re: Search plugin autocomplete with sub-sites

Post by v.krakhotko » Mon Aug 10, 2015 5:06 pm

Hi. Can you send me your plugin for autocomplete search? I try to make same one. I need custom field as (standard pimcore object) link-field but with autocomplete... may be possible to use your solution as example? Thanks.
Regards, Vladimir.

Posts: 46
Joined: Fri Oct 18, 2013 8:53 am

Re: Search plugin autocomplete with sub-sites

Post by dpfaffenbauer » Mon Aug 10, 2015 7:06 pm

You can find searchphp on github Pimcore-extensions. Feel free to open a pull request to fix this.

Best regards

Post Reply

Return to “Core-Plugin Development”

Who is online

Users browsing this forum: No registered users and 1 guest