Closed (duplicate)
Project:
Location
Version:
6.x-3.x-dev
Component:
Location_views
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
15 Dec 2008 at 00:17 UTC
Updated:
3 Dec 2009 at 16:17 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
drewish commentedwhoops, last patch had some unrelated changes.
Comment #2
bdragon commented+1, I kept wanting to put this in but kept getting lost when trying.
Comment #3
drewish commentedbetter title.
Comment #4
yesct commentedI'll try this patch. Thanks!
Comment #5
bdragon commentedAaaand, I feel stupid.
I went and independently reimplemented the relation yesterday, after having forgot about this patch.
Comment #6
drewish commentedhigh five! i've totally done that to people in my queues. now i'll just go ruthlessly review your code and post a correction patch ;)
Comment #7
bdragon commentedSounds good to me :)
Comment #8
scottrigbyHi, I tried to do this with the current dev version, but wasn't able to. (adding a relationship -Configure Relationship Content: Location [field_name])
Then I looked to find bdragon's implementation, but wasn't able to understand how this worked for individual Location fields.
However, when I applied the patch in #1 by drewish (had to apply by hand because of changes since in dev), I was able to retrieve individual Location fields in Views.
So the patch seems to work for me... But am I understanding this correctly?
Comment #9
drewish commentedscottrigby, yeah bdragon didn't apply my patch and did his changes independently. could you roll a patch from the changes you applied?
Comment #10
scottrigbyHi Drewish - yup - here's a patch against the latest.
But... I'm not sure what bdragon did independently on this issue, so this doesn't account for any possible conflicts with the independent changes he did -- I haven't run into a problem yet, but if you have a better sense of those changes could you see if this could be an issue? Maybe it's not, which would be great :)
Comment #11
bdragon commentedBumping this up and having another look.
Comment #12
monjohn commentedThis patch wouldn't apply to the latest release. I tried to apply by hand but still can't get the functionality. I thought that I had it before I updated the module though.
Comment #13
yesct commentedAnyone have a patch that applies now?
Comment #14
yesct commentedis #391160: CCK/Views: location_instance fix a duplicate?
Comment #15
Anonymous (not verified) commentedSuccessfully applied patch from #10 above, but cannot see any changes to relationships in views... Am I missing something?
Comment #16
yesct commentedTagging.
Comment #17
yesct commentedTagging.
Comment #18
yesct commentedmarked #338485: cck field locations not appearing on map (the location "fields" not in the view "fields") as a duplicate of this issue.
Comment #19
yesct commentedalternate method #431290: Views -> Field Location: Coordinates = NULL (please take a look and discuss)
Comment #20
bdragon commentedOK, patch reroll with just the good stuff and a way to disable the implicit stuff with a variable change / cache clear.
Comment #21
yesct commentedsmall change to the patch to fix the default labels for nodes and node revision relations
here is a diff on my patch vs bdragon's latest
Comment #22
Anonymous (not verified) commentedJust applied YesCT's patch from #21 to latest location.dev (April 18). I created a new View of type 'Term', but in Relationships, the only option is 'Taxonomy: Parent Term'...
Someone able to explain how this works?
Comment #23
yesct commentedHmm, I think the only views I have tried are of type "node".
Comment #24
libeco commentedSorry if I did not understand this properly.
I'm using this on a local test setup:
Drupal 6.11
Location 6.x-3.x-dev (2009-Apr-18)
Gmap 6.x-1.x-dev (2009-Apr-18)
CCk 6.x-2.2
Views 6.x-2.5
Using the dev versions was the only way for me to let a map show up in the location block in Drupal 6.11.
I just used the patch in #20 (copied and recplaced in original file). I created a location view and used Location: Nodes as relationship.
But what's next, where can I use this relationship?
I'm trying to create a proximity search view (aren't we all when searching for this here on Drupal :)).
Thanks in advance!
Comment #25
jasontanner commented.
Comment #26
Anonymous (not verified) commented#23
Uh, yeah. I must be losing my mind... I'm looking for a relationship from a term to a node. Don't know why I'm here...
Keep up the good work guys :)
Comment #27
bstankie commentedHello-
I've applied the original patch, patch #1 and patch on cck. I now have a relationship ('Location:Noes') but I still cannot get the location information to display in the Views. Perhaps there is a step that I am missing. Can anyone summarize the steps that they have used to get the location module to work with Views.
I am willing to help however I can.
Thanks,
BStankie
Comment #28
vm commentedthe patch is #1 is no longer relevent you want the patch in #21. Always use the last available patch rather than the first.
Comment #29
vm commentedmy testing of this has found no bugs. I hesitate to move to needs review until others have also tested.
Comment #30
RoboPhred commentedThe patch in #21 no longer applies against HEAD.
Comment #31
vm commentedIt applied to -dev for me. I didn't try HEAD
Comment #32
yesct commentedI was making a video of doing some location stuff, and while trying to apply this patch, I had to disable views and views UI, then re-enable them, for it to see the changes made by the patch. Is there an easier way to get it to see the changes make to the code? (cache clear did not seem to do it.)
Comment #33
yesct commentedI made a video trying to see what this patch is for.
http://cathytheys.blip.tv/file/2157286
More coming, more questions and more demos.
But I got some stuff to work without the patch.
Comment #34
mdayton commentedsubscribing
Comment #35
mrgoltra commentedtag
Comment #36
rangerfrex commentedThanks, subscribing
Comment #37
BaronVonInternet commentedI know next to nothing about how Location/Views/CCK work and relate to one another, but I can say that I applied the patch in this thread to the latest dev version, and it patched properly but didn't seem to do anything at all, even after disabling and re-enabling views+views ui+location as suggested.
However, for anyone who needs an immediate solution without modifying any core files (or any files whatsover, not even patching) here is a quick (and perfectly safe?) way to make this work until a true fix is released.
In the database table location_instance, you will see that vid for these fields is always "0". You will also see that the genid fields are something like "cck:field_location:35". If you manually put that last id number into vid for each record, it starts working. From there, you could set up a hook or cron to run a script to fill in those fields automatically (sorry, in my case I just needed to use it with some prepopulated fields so I haven't done anything like that).
Edit: Duh. Or you could just use the relationships method described by YesCT in her video. I missed that the first time around, and that's definitely simpler than having a hook to run an update on that table.
Comment #38
kmontySubscribe
Comment #39
izmeez commentedsubscribe
Comment #40
socialnicheguru commentedYesCT #33 thanks for your videos.
I guess my question is why do I need this patch? Everything seems to work when your cck value is a relationship. I only have a single location per node. I don't know how this works for multiple locations per node.
Would any of these patches help me with proximity search for location cck fields?
Thanks,
Chris
Comment #41
Webster619 commentedThis patch is needed if some has a series of state nodes and business nodes. Each business node is associated to a state via location module. With this functionality you can now create a single view that will display the business nodes in a given state on each state node.
Comment #42
jthaxton commentedI have applied the patch, but my CCK location nodes never show up in the relationships list. I feel I am missing a very basic step in setting things up.
Comment #43
sagannotcarl commentedYesCT, thanks for the video. I got everything working up to that point but it's still pretty limiting to have to type in static lat / long. Is a separate relationship needed to key that filter off the current node (for example)?
Comment #44
pursuitofliberty commentedsubscribing.. also having same issues with recent dev build
Comment #45
zmove commentedHi,
I followed the video, putting the relationship between the location node and the CCK field.
My field appear in a view when I go to the field options, and that I select the relationship.
However, I need to filter views depending on a country, I did the same thing for the country filter : Location > country, I put the relation on that filter, I expose it, and when I try to use it, I always get no results : this is exactly the same behavior than before the relationship.
So this solution seems to work to display field, but not to filter them.
Any ideas ?
Comment #46
nickl commentedThis approach is not ideal, working patch ready to be revied which solves this issue as well CCK/Views: location_instance fix
Comment #47
kpojeta commentedsubscribe