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.

Comments

becw’s picture

Priority: Normal » Critical

This 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:

  • setting "Location Name" to "Require" hides the location name field (to duplicate: add a new location cck field to a node type. on the field settings page under "collection settings", choose "require" next to the "location name" field, hit save. view the node creation form.)
  • setting "Additional" to "Do not collect" while "Street Location" is set to "Allow" fails to hide the "additional" field.
  • when you create a field, "City", "State/Province", and "Postal Code" fields are each set to "Do not collect". I think that it would be more appropriate for these to be set to "Allow", initially.
becw’s picture

Priority: Critical » Normal

urm, sorry, didn't mean to take this critical :)

WesleyTx’s picture

I 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.

david.sarnowski’s picture

Version: 5.x-3.0 » 6.x-3.0

Having the same issue with 6.x-3.0 as well. Also note that Additional is appearing above Street even if it is weighted heavier.

vegagitator’s picture

I 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.

becw’s picture

Status: Active » Needs review
StatusFileSize
new1.69 KB

ah, 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).

bdragon’s picture

Version: 6.x-3.0 » 6.x-3.x-dev
Status: Needs review » Fixed

Modified patch discussed with becw in irc, fixed.

http://drupal.org/cvs?commit=163474
http://drupal.org/cvs?commit=163475

WesleyTx’s picture

Any chance this will be ported to 5?

bdragon’s picture

WesleyTx’s picture

Thanks very much!

trogie’s picture

Although, is it possible this patch gives me a 'Cannot use string offset as an array in line 354' in 6.x-3.x-dev?

peter076’s picture

I'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.

becw’s picture

@peter076 - have you tried the 5.x-3.x-dev version?

peter076’s picture

Yes, 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 ;(

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

mcfilms’s picture

Status: Closed (fixed) » Active

How 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?

bdragon’s picture

Assigned: Unassigned » bdragon

Because 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.

bdragon’s picture

Could you edit your field and resave it, and see if that helps? I am not able to reproduce.

mcfilms’s picture

Hi 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!

bdragon’s picture

Oh, 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."

mcfilms’s picture

StatusFileSize
new125.91 KB

Ah 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

bdragon’s picture

Hmm, 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...

yesct’s picture

Status: Active » Postponed (maintainer needs more info)
Issue tags: +location display settings hide

Download 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.

mcfilms’s picture

Yeah, 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.

yesct’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

ok. :)

couloir007’s picture

Status: Closed (fixed) » Active

Under '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.

vm’s picture

I 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.

squarecandy’s picture

location-6.x-3.1-rc1 fixes these problems for me... Thank you! Thank you! Thank you!

yesct’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

ccollins’s picture

Hello,

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

held69’s picture

Status: Closed (fixed) » Active

Having this issue with 6.x-3.1-rc1 as well.

vm’s picture

Status: Active » Fixed

which would be why you should upgrade to the lastest version which is 3.0

held69’s picture

sorry 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?

vm’s picture

Nope. 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

okday’s picture

I have this issue with the last dev 3.x

yesct’s picture

Status: Fixed » Postponed (maintainer needs more info)

could 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.

julie.metivier’s picture

StatusFileSize
new199.64 KB
new205.45 KB

Hi,

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

yesct’s picture

Julie, Just checking... which version are you using?

julie.metivier’s picture

Sorry, 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

yesct’s picture

both.. 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).

julie.metivier’s picture

Thank 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.

yesct’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

that 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!)

seanr’s picture

Priority: Normal » Major
Status: Closed (fixed) » Active

This is still not fixed in 6.x-3.1. None of the hide settings are respected at all.

problue solutions’s picture

Still not fixed in the latest dev version, 2 years later

bdragon’s picture

You 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.

hongpong’s picture

I was able to hide coordinates but not country fields. with latest dev hmm...

legolasbo’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Closing old D6 issues as D6 is end of life