Closed (fixed)
Project:
Location
Version:
6.x-3.1
Component:
Location_views
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
4 Oct 2010 at 15:45 UTC
Updated:
31 Aug 2011 at 10:33 UTC
I am using the location module as a field so the user can enter a City and State when they add a project node. For some reason when I try to display the location as a view it won't show the location.
I am adding this as a field: Content: Location (field_project_location)
Shouldn't this mean that it will display anything added to the overall location field???? example: Long Branch, NJ
Nothing will display? am I filtering wrong? the only two filters that I have are "Published: Yes" and Node: "Type = project"
Comments
Comment #1
pbrough commentedI am also having this problem. I have been through the patches from here http://drupal.org/node/427432 and also tried to use the country code on its own.
The shows Node Title and the Country. But for a lot of nodes the country is blank.
A direct SQL query from the view also shows up a NULL in the country column. However none of the locations are NULL.
I know the filtering is not a problem as the country is exposed and some nodes do have a country listed.
Comment #2
dougm commentedI have a similar problem. None of my Location field values show up when I use Views to display the data in the content type.
All of the content have a Location field with value in it. If I look at the content it is there.If I tell views to use "nodes" rather than "fields", and use an unformatted display, then the Locations show up. If I use fields, and then look at what the SQL code returns, it does return valid ids for the Locations. They display as empty fields even though the SQL has a value for the field. Basically, it is always empty when using fields but I can get a value for nodes as long as it isn't one of the formatted forms. I can provide more info if needed.
Comment #3
rooby commentedIf you are using node locations or user locations then you can just use the "Location: whatever" fields and they will work.
If you are using a cck location field only the "Content: field_name" field will work (although not in 3.1, only in the current dev as it was fixed recently.
The user the "Location: whatever" fields you need to add a relationship to your view between the cck field and the location table and then when you use location fields make them use that relationship.
The relationship you need is a content relationship and will be called "Content: field_name" where field_name is the name of your field.
I hope to document all this properly sometime soon as this is a common question.
Does that fix your problem?
Comment #4
dougm commentedIt didn't resolve my problem. I may be misunderstanding what your fix is.
I added a relationship on the view for the Location: <> field and that didn't change
anything. I can send you a login if looking at it yourself would help.
Thanks,
Doug
Comment #5
rooby commentedSorry, maybe I misunderstood your post.
If you are using the "Location: whatever" fields you need the relationship but if you are using the "Content: field_name" field you don't need to.
If you are using the "Content: field_name" field then you problem is probably that there was a bug causing this to not work, which was fixed in this issue - #427432: RTBC Content: Location views field always blank very recently.
So for that you will have to use the 6.x-3.x-dev version instead of the 6.x-3.1 version.
If you still can't get it to work after that can you paste an export of your view into a text file and post it here.
Comment #6
dougm commentedThe dev version solved my problem! thank you.
Comment #7
rooby commentedCool, the original poster's problem seems to be the same but they can re-open if their problem persists with the dev version.