After enable apachesolr_ajax, suddenly the apaxhesolr_autocomplete module no longer works on search/apachesolr_search.

Comments

Anonymous’s picture

I tried this suggestion:

function MYMODULE_apachesolr_ajax_modules_alter(&$modules) {
  $modules[] = 'apachesolr_autocomplete';
}

But that doesnt work. Any ideas on getting apachesolr_autocomplete to work?

jpmckinney’s picture

You don't need to implement MYMODULE_apachesolr_ajax_modules_alter.

The problem is a conflict between misc/autocomplete.js and apachesolr_ajax.js. I would have to study autocomplete.js to discover a way to have the two co-exist.

jpmckinney’s picture

Version: 6.x-1.8 »
Category: bug » feature
jpmckinney’s picture

Title: Incompatible with apachesolr_autocomplete » apachesolr_autocomplete integration
robotjox’s picture

I have the exact same problem - subscribing

robotjox’s picture

just tried 1.11 - at first I was happy because autocomplete now seems to work - unfortunately apachesolr_ajax stopped working :(
Had to go back to 1.10 to get ajax working again.

loganfsmyth’s picture

Could you confirm whether or not you have tried the "Missing JavaScript files" fix in the troubleshooting section here: http://drupal.org/node/846694

I'm not sure how our recent changes will effect the autocomplete issues you where having though. We should now be properly using Drupal behaviors, so there is a better chance it will work anyway.

robotjox’s picture

Thanks for replying so fast!

Yes, I have those lines (they are necessary for me with 1.10 too), but with 1.11 apachesolr_ajax.js does not get loaded even with these lines present (jquery.livequery.js does though?!)

The bad thing is that even when I add apachesolr_ajax.js manually, the module still does not seem to work.

The yui iframe is also gone in 1.11, but adding that one manually does not seem to help much either :(

As I said, reverting to 1.10 makes it all come back, but I really need autocomplete to work together with ajax.

I would love to help troubleshooting this, but I have no idea where to start...

robotjox’s picture

correction - the iframe GETS added; my mistake!

robotjox’s picture

small addition: if I change this line:

drupal_add_js(drupal_get_path('module', 'apachesolr_ajax') .'/apachesolr_ajax.js', 'module', 'footer');

to:

drupal_add_js(drupal_get_path('module', 'apachesolr_ajax') .'/apachesolr_ajax.js');

the apachesolr_ajax.js file gets added. But again, it doesn't seem to get the module working properly :(

loganfsmyth’s picture

Sorry, I should have been more specific. Can you confirm specifically if the $vars['closure'] = theme('closure'); bit is there in the preprocess_page hook? We just added that today, so it wouldn't have been there from before.

If that is there, can you confirm that your theme has print $closure; at the bottom of the page.tpl.php?

loganfsmyth’s picture

Status: Active » Postponed (maintainer needs more info)
Quarantine’s picture

Subscribing. Haven't tried using this module yet, but I will when it can co-exist with apachesolr_autocomplete.

loganfsmyth’s picture

I may not have been clear enough in #11. There is a very good chance that this will work fine with apachesolr_autocomplete now due to several changes that we made.
I don't have time to set up a test site just for this at the moment, so if someone decides to try it out, then please report back whether it works or not. I would say there is a 90% chance that it will work now.

If no one ever tries it, I guess we'll never know.

Quarantine’s picture

Thanks, clearly I missed that bit. I'll give it a spin and will report back when I get apachesolr to work on my site.

loganfsmyth’s picture

Great, thanks. :)

marcoka’s picture

i would be in for tesing too, but where is the latest dev located? Definitely not here: http://drupalcode.org/viewvc/drupal/contributions/modules/apachesolr_ajax/

Could you tell me where the 6x dev is located?

jpmckinney’s picture

You can get it with this command:

cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib checkout -d apachesolr_ajax-HEAD -r HEAD contributions/modules/apachesolr_ajax/