I'm using a CCK Location field. Under Widget Settings > Locative Information > Display Settings > Hide fields from display, I check any number of fields I don't want to display, and the settings have no effect. Everything is still displayed in the node.
In location.module, under function template_preprocess_location(), I added print_r($variables) and nothing appears in the $variables['hide'] array, which I believe is used at that point to determine which field keys to unset. I'm not clever enough to trace this back any further to find where the problem actually lies.
| Comment | File | Size | Author |
|---|---|---|---|
| #38 | additional_settings.jpg | 205.45 KB | julie.metivier |
| #38 | additional_displayed.jpg | 199.64 KB | julie.metivier |
| #21 | PicOfMissingLocationSettings.zip | 125.91 KB | mcfilms |
| #6 | location_cck_hidden_output.patch | 1.69 KB | becw |
Comments
Comment #1
becw commentedThis is also true with the 6.x-3.0 and 6.x-3.x-dev (as of this moment) versions; the "Do not collect"/"Require" options do not behave as expected. Specifically:
Comment #2
becw commentedurm, sorry, didn't mean to take this critical :)
Comment #3
WesleyTx commentedI believe that's a separate issue, actually. If I understand correctly, the collection settings affect what form fields appear on the node-creation form; the display settings affect what data from those fields appear when viewing the node.
Comment #4
david.sarnowski commentedHaving the same issue with 6.x-3.0 as well. Also note that Additional is appearing above Street even if it is weighted heavier.
Comment #5
vegagitator commentedI had the same problem with the "require" option until I set the minimum number of location types to 1. This is a separate issue, though.
Comment #6
becw commentedah, you are right WesleyTx, I didn't read very carefully :)
That said, I can confirm that the original issue still exists in the latest 6.x-3.x-dev. I'm attaching a patch that fixes it (controlling the display of location cck content).
Comment #7
bdragon commentedModified patch discussed with becw in irc, fixed.
http://drupal.org/cvs?commit=163474
http://drupal.org/cvs?commit=163475
Comment #8
WesleyTx commentedAny chance this will be ported to 5?
Comment #9
bdragon commentedFair enough. Done.
http://drupal.org/cvs?commit=164281
Comment #10
WesleyTx commentedThanks very much!
Comment #11
trogie commentedAlthough, is it possible this patch gives me a 'Cannot use string offset as an array in line 354' in 6.x-3.x-dev?
Comment #12
peter076 commentedI've made the adjustment for my version (5.x) but unfortunately it's not working.
Any selection in 'hide fields from display' will result in having the defaults:
latitude, longtitude, location name, additional, street, country.
Comment #13
becw commented@peter076 - have you tried the 5.x-3.x-dev version?
Comment #14
peter076 commentedYes, tried that.
I installed the latest dev. version (2009-Jan-14) with location_cck.module 1.1.2.4 (2009/01/12 16:03:28), but with no effect.
Still the selected fields that should be disabled, are displayed ;(
Comment #16
mcfilms commentedHow is this marked fixed/closed? Two people reported the issue even with the patch. I am experiencing the same issue. Is their no way to turn off the display of latitude and longitude fields?
Comment #17
bdragon commentedBecause nobody changed it from fixed back to an active state, so it got autoclosed two weeks later.
Looking at what's up with the D5 version now.
Comment #18
bdragon commentedCould you edit your field and resave it, and see if that helps? I am not able to reproduce.
Comment #19
mcfilms commentedHi bdragon,
Let's assume I am a novice, because I am. Sorry if I sounded pissy about the issue getting knocked out of the cue, BTW. The tone was supposed to be more like, "how does this happen?") Anyway...
Let's jump right to the likely root of my problem. Pilot error. I am installing the CVS of Location --- location_cck.module,v 1.5.2.8 2009/02/25 17:29:58 bdragon I already have Location module installed and running.
Now I've patched a module before, but haven't worked with an edited module. My assumption is, that I just add this module to my Location directory. Not sure if this is correct. And I don't see an additional module to enable under CCK or Location.
Well, if I did that right, read on:
What I really want is just a list of countries that defaults to U.S. (Sorry world). I had this with a text field, but the person I am working with is convinced we may want the geo-locating capabilities down the road. So I have stripped everything down to just country and selected US as the default. No data collection, no display.
Now when I include this field in my Content Type that collects this information, I get two large Latitude and Longitude fields and my country drop-down menu is set to "Please Select"
So did I go wrong waaaaay back in step one, or is the module not working? Or is it not designed to turn off those fields.
Thanks!
Comment #20
bdragon commentedOh, I was just explaining why it got marked as closed. I'm not annoyed or anything.
Hmm, you should be able to disable the latitude and longitude fields by setting "Coordinate Chooser" to "Do Not Collect."
Comment #21
mcfilms commentedAh ha!
That is my problem. I do not have a "co-ordinate chooser." I took snapshots of my display under both the Location Configuration and the Edit field in my CCK display. I don't see the chooser, and as you'll see I have as much of the "Display Cordinates" turned off as possible.
Please take a look at:
http://motioncity.com/drupal/node/55
I have attached the PICs as well
Thanks!
Jerry
Comment #22
bdragon commentedHmm, are you mixing different versions? The ability to hide longitude and latitude is also a post 3.0 change. (#351840: Additional field order appearance)
I'm not able to reproduce, even when creating an admin account that doesn't have permission to use that field...
Comment #23
yesct commentedDownload the latest versions and see if it is still a problem, or at least respond with the exact versions that you have. Thanks.
And tagging.
Comment #24
mcfilms commentedYeah, I can't really help any longer. After not hearing back I went in another direction. It ended up being much simpler to just create CCK fields with the location information I wanted. Thanks anyway.
Comment #25
yesct commentedok. :)
Comment #26
couloir007 commentedUnder 'Collection settings' I have set 'Additional'=>'Do Not Collect', yet it still shows up when creating a new node. I could hide it with CSS, but I wouldn't consider that ideal.
Comment #27
vm commentedI am noticing the above as well but think it should probably be put in a new issue to avoid gettying caught up in a thread that was originally about something similar but different.
Comment #28
squarecandy commentedlocation-6.x-3.1-rc1 fixes these problems for me... Thank you! Thank you! Thank you!
Comment #29
yesct commentedComment #31
ccollins commentedHello,
This issue appears to have been marked as closed and resolved, however I still see this behavior using 6.x-3.1-rc1.
Specifically, as long as "street location" is set to "allow" or "require", the "Additional" field will always display. If both "street location" and "additional" are set to "do not collect", neither will display, as expected. Also, if "street location" is set to "do not collect", but "Additional" is set to "allow" or "require", it WILL display.
Thanks for any help resolving this issue. I'd really like to not display the "Additional" field, while displaying the "Street Location" field.
CC
Comment #32
held69 commentedHaving this issue with 6.x-3.1-rc1 as well.
Comment #33
vm commentedwhich would be why you should upgrade to the lastest version which is 3.0
Comment #34
held69 commentedsorry for opening then but according to project page info:
location 6.x-3.1-rc1
March 3, 2009
seems to be more recent then
location 6.x-3.0
December 12, 2008
(I first had this issue with Location 6.x-3.x-dev 2009-Jul-31 )
Did i miss something?
Comment #35
vm commentedNope. I read 3.0-rc1 my first time through. Too much coffee I guess. I'll have to check my install but I don't believe this is happening there any more. though I think I am using the latest -dev
Comment #36
okday commentedI have this issue with the last dev 3.x
Comment #37
yesct commentedcould you please clarify just what issue you are having when you say "i'm still having this issue"...
are you specifically having trouble with the additional field? as in #31 above:
http://drupal.org/node/355320#comment-2663650 ?
I know it's a pain, but please try the new dev version:
http://drupal.org/project/location
and post some screen shots or describe your settings exactly so we can reproduce.
Comment #38
julie.metivier commentedHi,
I'm not sure if my issue is the same as this one. I'm using location module with the user module but not with CCK.
But I noticed the same behavior: The field "Additional" is still displayed in the user registration form (admin/user/user/create) even if this one is "not collect" (admin/user/settings) in the User settings page.
Please have a look on the print screens.
Thank you
Comment #39
yesct commentedJulie, Just checking... which version are you using?
Comment #40
julie.metivier commentedSorry, I'm a newbie with Drupal and not sure which number is the version: location.info,v 1.3 2008/07/24 or version = "6.x-3.0"
Thank you
Comment #41
yesct commentedboth.. but I was referring to: 6.x-3.x-dev type of version. Try it with that dev (try it on a test site, not your live site).
Comment #42
julie.metivier commentedThank you, it works now!
Could I use the dev version on a live site, wait for a new version or just make a correction on the recommended version?
Sorry for the question... it seems to work fine, but I don't want to expose the website to new issues.
Comment #43
yesct commentedthat is a call you'll have to make.
Test the dev as much as you can with a copy of your site. If all seems to work, maybe use it live. But definitely keep a backup (and make sure you can restore from the backup ... try it!)
Comment #44
seanrThis is still not fixed in 6.x-3.1. None of the hide settings are respected at all.
Comment #45
problue solutionsStill not fixed in the latest dev version, 2 years later
Comment #46
bdragon commentedYou sure about that? I am not able to reproduce with 6.x-3.x. However, since the last release is so old, it does not have this bugfix.
Comment #47
hongpong commentedI was able to hide coordinates but not country fields. with latest dev hmm...
Comment #48
legolasboClosing old D6 issues as D6 is end of life