Reviewed & tested by the community
Project:
Location
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Sep 2014 at 18:52 UTC
Updated:
13 Feb 2019 at 08:49 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
GilAnder commentedHI,
To dismiss the Location field, you have to modify the concerned content type -> Locative information and set the maximum number of locations to 0.
Hope this will help.
Comment #2
js commentedI have a location field on unnecessary content types with only these fields
Label: Location
Machine name: locations
Field type: Location module form elements
without widget or operations. So I can't edit the maximum number of locations directly.
I am getting an error from entity.inc
warning: array_flip(): Can only flip STRING and INTEGER values!
which I hope is related.
This problem might be the result of upgrading D6 to D7.
Any help would be appreciated.
Comment #3
vishalgala commentedComment #4
legolasboClosing support tickets that have been inactive for over a year to clean up the issue queue. Please reopen if this is still an issue.
Comment #5
smurfxx commentedProblem is still here, every new content type has a location field and not editable.
I'm on Drupal 7.50
Comment #6
smurfxx commentedComment #7
smurfxx commentedComment #8
legolasboCritical seems a little over the top for an issue that has been inactive for 2 years.
Comment #9
rooby commentedThe location module is adding this with location_field_extra_fields() but it is the location_node module that actually uses it, so if you don't use the location_node module then it is there for nothing.
Seems like location_field_extra_fields() should be in the node_location module instead.
Comment #10
jimmynash commentedI had already disabled and uninstalled the location_node module and was still seeing the Locative Information field in the manage fields area of all my content types.
Since there was no implementation of hook_extra_fields in the location_node module I moved the hook from the location module to the location_node module and changed the function name to match it's new home. Cleared the cache and the field no longer shows in the manage fields area.
I then re-enabled the location_node module and the extra field was back provided now by location_node. Disabling location_node then removed the field from the manage fields area.
So, I removed this function from location.module
and moved it to location_node.module
renaming it to this
This seemed to do the trick for me.
Comment #11
rooby commented@jimmynash:
Yep, that is the solution mentioned in #9
Could you make a patch for that?
Comment #12
dlaufer commentedPatch from #10 to move location_field_extra_fields() from location.module to location_node.module so that the Location module form elements field gets removed when disable location_node.
Comment #13
dlaufer commentedComment #14
davemybes commentedThis works great and fixes the small annoyance of having the field always there. Thanks!
Comment #15
technotim2010 commentedHi
Installed the patch in #12 and can confirm it works, no bugs to report and can be set as RTBC
Tim