Posted by sjf on May 1, 2009 at 7:23am
10 followers
Jump to:
| Project: | Location |
| Version: | 6.x-3.x-dev |
| Component: | Location_views |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
| Issue tags: | Location proximity view, location proximity view zip code, Location theming, location useful code |
Issue Summary
In Views, if you create a Location:Distance/Proximity Filter and expose it, you get two boxes - one for postcode (or lat/long), and the other for entering the distance in miles. This works fine.
However, if you put the exposed filter in a block (using the standard "Exposed form in block: Yes" option in Views), the Postcode field disappears, leaving only the distance field. Checking in Firebug, this seems to be a style issue but one that isn't generated by my CSS:
element.style {
display:none;
}
Is this being generated by location.module?
Comments
#1
I had the same issue and added the following to my css file
#edit-distance-latitude-wrapper, #edit-distance-longitude-wrapper {display: block !important;
}
see http://94.3.203.213/upforsale02/propertyprox2
where in the uk are you based?
regards
Joe
#2
tagging
#3
I should have known that... Works great. Thanks.
#4
is there a fix/patch to location needed?
#5
Probably, but I couldn't find the file responsible for generating the element.style{display:none;} for #edit-distance-latitude-wrapper and #edit-distance-longitude-wrapper
#6
I can tell you that code is generated from some javascript. There is a reference to jquery and the postcode field. Related ?
#7
#470666: In exposed filter block, "Postal code" filter disappears after hitting "apply" was marked as a duplicate of this issue
#8
I added #edit-distance-postal-code-wrapper into my css with the above code, and it doesn't work for postal code search...It gets hidden..
any idea?
#9
nevermind...I just cleared my cache and now it works.
Thanks
#10
is there a css file that comes with location that can be patched adding important to the three ... -wrapper thingies?
#11
The CSS hack (besides being just that) stopped working for me after I applied a bunch of other styles to my site.
Does anyone know a real fix to this? I am totally js-ignorant so I don't even know where to start looking. Though... it looks like #493266: Problem with exposed date filter display is a different flavor of the same problem? So maybe the problem lies somewhere up the food chain?
#12
marked #463048: Zip or Zip/Country, or City disappear in exposed filter as a duplicate of this issue.
#13
I've noticed a couple of strange things with this today, maybe someone can confirm this..
If you have any additional exposed filter for a cck field with a "one of" operator (displaying a select list), the postalcode filed disappears. I've checked this a half dozen times, removing the filter and putting it back, and the same result each time.
Secondly, if you expose the view as a block, postalcode field is gone. But if you set it back to "no" for exposed as block, and you still have your block enabled on your views page, the form will then show up twice on the page (once along the top as normal, and once where the block is (even though expose as block has been disabled).The odd thing is that In the block form, postalcode is there, but not in the normal form at the top.
Can anyone confirm this? Also the css code didn't work in my case for views exposed as blocks, but it seems to work for allowing the additional exposed droplist filters in the regular view play nice with the locations postalcode/zip field..
** update - scratch the last remark, the css code does work great for views blocks for me also. (Since I'm using zip/postal not lat/long, the id name was different and I missed it).
#14
This worked for me.
#edit-distance-latitude-wrapper,
#edit-distance-longitude-wrapper,
#edit-distance-postal-code-wrapper,
#edit-distance-country-wrapper
{
display: inline !important;
}
display: block !important did not.
I don't really understand the difference between
display: inline !important; vs
display: block !important
#15
#14 works for me but it's indeed not fixing the root of the problem.
#16
I guess we need someone to look at the code and figure out which file to put the css in. then make a patch.
Maybe try going in to #drupal or #drupal-support and saying
"hi. I want to make by first patch. where do I look in the code for a contrib module to find where to add the css I need to to fix a problem?" ...
making a patch
http://drupal.org/patch/create
irc
http://drupal.org/irc
usually people in irc like to help new people become the kind of people who can patch stuff. :)
#17
I believe we need a patch if this is still an issue.