"If the block of exposed filters is located on the same page as the results, the .form-text text fields don't expose." (http://patrickteglia.com/blog/i-hack-hell-out-views-exposed-filters)
In other words, say I create a view with exposed filters, one of which is a text-field of operator "between." If that block is visible on all pages in a left side-bar, then that between filter works fine. However, on the actual view page for which that block is designated, the two textfields following the "text-field is between:" are invisible (display:none as seen by firebug).
If I'm not making sense, tell me & I'll attach some screens.
Comments
Comment #1
leahecooper commentedI have the same problem, and am a little relieved I'm not alone ... thought I was going a little crazy.
Comment #2
Village Internet commentedSame issue here. When the exposed view block is displayed on the same page as the original view, the fields are not displayed. Here is the code i see:
<div id="edit-city-wrapper" class="form-item" style="display: none;">Comment #3
becw commentedI'm having this issue as well; I have a set of filters (non-optional, unlocked operator) exposed and chose the "exposed filters in block" setting. I then place the exposed filters block on on a node page, and also on the actual View page. The filters appear correctly on the node page, but on the view page the input boxes do not appear (see attached screenshots). It seems that dependencies are not processed correctly on the view page.
To duplicate:
1. Import this view: http://drupal.pastebin.com/f5a4d5c64 (a simple demo view, should work on any drupal site)
2. Go to admin/build/blocks and place one of the new blocks ("Exposed form: between_filter_test-page_1") on two pages: 'node/*' and 'between_filter_test'
3. Visit a node page and the 'between_filter_test' page
Comment #4
becw commentedThis bug happens because Views runs
views_process_dependency()on the exposed filters twice, which puts dependency information inDrupal.settings.viewsAjax.formRelationships[#id][num]and[values]twice, which confuses dependency.js. Views is building the exposed filters form twice--once in the block and again when the view is displayed (even though the form isn't displayed in the view).One way to fix this is to record which elements have been processed in the
views_process_dependency()function itself. I've attached a patch uses this method to fix the issue.However I'm having wicked déjà vu about this issue--I swear we talked about this issue in IRC a few months ago and this very same fix came up. I'm not sure if I just didn't follow through on a bug report or if it would be better to fix this in another place (for example, preventing the exposed filters form from being built twice). Glancing through my logs, I see it was in #drupal-views on Jan 27 2009... http://drupal.org/node/358314 was also mentioned but that patch didn't fix this issue.
Comment #5
merlinofchaos commentedI added a patch that caches the exposed form building, so that it will NOT be built a second time. This should fix this as a side effect.
Comment #6
becw commentedI believe the commit you're referring to is this: http://drupal.org/cvs?commit=219462
I've tested this patch using the steps I laid out in comment #3, and this issue is not fixed. The patch simply stores the form array for exposed filters--it doesn't prevent the element process functions from being run twice. It's the double processing of the form that causes this bug.
Comment #7
krisgraham commentedSame issue here. At least I know what's causing it.
subscribing
Comment #8
benone commentedsubscribing
Comment #9
jacerider commentedsubscribing
Comment #10
tahiticlic commentedbec's patch on #4 corrects it for me, with D6.14 and views 6.x-2.x-dev or 6.x-2-6
Comment #11
merlinofchaos commentedFixing wrong status
Comment #12
DrupalYedi commentedthe patch on #4 works for me too, with D6.14 and views 6.x-2.6
Comment #13
rokrthe patch on #4 works for us too, with D6.14 and views 6.x-2.6
Comment #14
a.catalucci commentedThank you becs, your patch worked for me too!
Comment #15
Bilmar commentedI have also come across this issue and found this thread.
The patch worked without any issues. Thank you very much for the great work!
Comment #16
mittalpatel commentedI updated the views version to 6.x -2.8 and now it's working like a charm !!!!!
Comment #17
merlinofchaos commentedOk, committed this.
Comment #19
vthirteen commentedreopening this issue because i just stumbled upon it with latest stable views.
exposed "Search: Search Terms" filter in a block. other filters are Node: Published Yes, Node: Type, and a cck textfield.
the result is no input form in the block and when i click apply instead of showing all the results or no result (depending on search filter settings) it redirects to one of the various pages in the same view.
i have to say that i set this exposed filter right after changing some key/label values in the cck textfield that filters the view. i re-checked the whole view after that and everything looks apparently fine. i'm mentioning it just in case.
Comment #20
vthirteen commentedforgot to say that the search filter does work when it's exposed but not in the block.
Comment #21
nunami commentedI'm also having the same problem. My views being displayed as a block don't show their exposed filters.
I'll look into the above patch and see if that brings about any results
Comment #22
nunami commentedthe patch in the #4 doesn't seem to work with D6.17 and Views 6.x-2.8
Comment #23
Letharion commentedThe original issue seems to have been fixed.
If this is still a problem for anyone, it's likely not a duplicate issue, but a new problem.
Please open a new issue.