Live Search & Collapsible Fieldsets
| Project: | Live Search |
| Version: | 5.x-1.0 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Someone mentioned an incompatibility earlier between Live Search and taxonlym_dhtml.
I am having a similar problem with my site and here's what I have been able to figure out:
If I use the Live Search feature in a block, and allow that block to display on every page, there is no problem with the collapsible fieldsets in the various pages (such as content creation forms). However, if I edit the block settings to only show Live Search on a certain page (in my case the page) any page that does not have the Live Search block enabled will have disabled collapsible fields. Viewing the error console in Firefox provides this clue:
Error: searchBox.val(localizedTerm) has no properties
Source File: http://mywebsite.com/modules/livesearch/livesearch.js
Line: 76
If I turn the block back on so that it displays on every page, the collapsible fields work fine. It looks like the JS code is producing an error if it can't find the Live Search loaded somewhere in the page. Not sure on a suggested solution, but I would think that something along the lines of only inserting the JS code on the page if the Live Search module is being used on that page.

#1
Ah. The reason why fieldsets are no longer collapsible is because the JavaScript error (from not being able to find the search box) caused the subsequent fieldset script to not run.
I've made a change in the script. Supposedly it won't throw a JavaScript error in your situation anymore, so all subsequent scripts will run. The HEAD snapshot isn't updated yet as of writing. When it's updated, it'll have a Last Updated date of May 9, 2007. Please try the snapshot and see if the error still exists.
#2
I'll take a look when I have a chance and let you know.
In my situation, since I was only using the live search on the front page, I simply changed line 12 of the livesearch.module file to:
if (user_access('search content') && $is_front) {I'll check yours soon, though, as my fix only works as long as you limit the live search to the front page.
Thanks!
#3
Just checked the HEAD code and it looks like it is working great now.
Thanks again!
#4
#5