Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I'm surprised, there is no easy way to have solr autocomplete support because of the class of your search box.
How can we change easily and durably the class to have "apachesolr-autocomplete unprocessed form-text form-autocomplete"?
Good luck, continue to do your great job!
Comments
Comment #1
anydigital CreditAttribution: anydigital commentedSorry for the late response. Could you give me a link? Or copy and paste the piece of HTML markup?
Comment #2
bdeusanio CreditAttribution: bdeusanio commentedHi,
I've activated your awesome theme. I've customised it, but i haven't custom your system.inc or search.inc
I've activated apache solr module.
When i submit a search via your block search form, i go back to search page with a blank keyword.
I should have search/!keyword
where !keyword is the value I wanted to search on.
Maybe search page can't retrieve the requested value.
Piece of code for solr autocomplete on garland :
on your theme :
Have a nice day,
continue your great job!
[EDIT] I've compared your theme with drupal bootstrap theme (project). The way the search block is manage is different, but it works with POST Mehtod. Maybe the key is in bootstrap/includes/form.inc.
Good luck
Comment #3
bdeusanio CreditAttribution: bdeusanio commentedthe problem comes from the way you declare your search form and search form block.
I copy and past form.inc in your search.incl (redeclared in tweme_) and delete the preprocess_button (cause it's declared in your system.inc) and it works.
I don't really where the problem is, but I know you'll find why. I'm not as good as you to develop and fix that bug
Comment #4
bdeusanio CreditAttribution: bdeusanio commentedThe solution explained juste before doesn't really work....
In fact, if you do what i've read, the search form will work but only on the page search/site. If you're not on this page it won't.
An example, if you're on the home page, and search 'foo', you'll be redirected to the http://my_drupal_website//foo
the search page path is not filled, and i don't understand why.
I've found another code to do the same thing:
If you have any idea, please, feel free to help me.
Thanks
Comment #5
bdeusanio CreditAttribution: bdeusanio commentedTo put on the autocomplete search-form, you have to modify your tweme_preprocess_page to add
It works
But if you click on any result you'll be redirected to the search/site page with no result since the search-form page path problem will be solved.
to remind you the problem, when you search anything on your navbar search block, the keywords you taped won't be used to the search, so it's no possible to use the navbar search.