Upgrade Your Drupal Skills

We trained 1,000+ Drupal Developers over the last decade.

See Advanced Courses NAH, I know Enough

Views Autocomplete Filter and HTTP 0 error fixed

Goal: Improve User Interface for our 10,000+ list of electronic resources.

Solution: When working with long lists  a good UI makes all the difference. In our electronic resources catalog the Views Autocomplete Filter module allows patrons to filter through thousands of titles in a few clicks. Views Autocomplete Filter works in much the same way as Better Exposed Filters (and I wish there were some way to have both filters in the same view – if anyone reads this and has a thought on that it’d be greatly appreciated…). For the videophiles here’s the two minute review

Views Autocomplete Filter

 

 

Oddities: The only problem was we got a stinking HTTP 0 error if the patron tried to apply the exposed filter before the site came up with a suggestion.  http://drupal.org/node/627834#comment-2398782 is a pretty straightforward workaround to log errors to a log instead of to the user’s screen…we don’t really care, in our case final fix looks like this

 

commented line 284 of webroot/misc/autocomplete.js
error: function (xmlhttp) {
//alert(Drupal.ahahError(xmlhttp, db.uri));
}

and with that we achieved greater happiness, and all was better in the realm.

For Drupal 7 Autocomplete Deluxe looks pretty nice as well…

Author: 
Original Post: 

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web