Closed (fixed)
Project:
Location
Version:
6.x-3.1-rc1
Component:
Location_views
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
16 Mar 2009 at 07:48 UTC
Updated:
20 Jul 2010 at 20:55 UTC
Jump to comment: Most recent file
Comments
Comment #1
matt v. commentedI believe you need to first add a "Relationship" for "Content: Location - (field_location)" because the phone is stored in a separate table. You should then be able to see phone and fax listed under the Fields section. However, I just did the same and when I try to actually add the phone number to the view, I'm getting the following error:
Comment #2
mattyoung commentedI see they are stored in tables 'location_phone', 'location_fax' and related by 'lid'.
However, how do I add e relationship to these two tables? When I add relationships in views, I only see choice for "Comment: Node", "Comment: Parent comment", "Comment: User", "Node revision: User" and "Taxonomy: Parent term".
Comment #3
z33k3r commentedSame here. No idea where/what to select for any type of relationship(ing)...
Comment #4
Buddharide commentedDitto, no phone or fax.
Comment #5
matt v. commentedI just tried uninstalling the Location module on my development site and reinstalling using the latest DEV version of Location instead. When I now try to add a phone number field to my view, I get an error saying:
I tried deleting and recreating the location relationship within Views, but that didn't seem to make a difference. The error message isn't very descriptive, so I'm not sure where to start digging for more info.
Comment #6
matt v. commentedI just realized that despite the nondescript error message, the phone field was getting added to the view. And the phone number is now getting displayed. Woohoo!
Thanks for the great module and for all the development and bug fix work that has gone into it!
Comment #7
mattyoung commented>the phone field was getting added to the view. And the phone number is now getting displayed. Woohoo!
I just install the dev version and I still cannot see the phone and fax field in view.
I use the Locative Information setting in the node itself. I'm not adding Location as CCK field because I found gmap view only works with the Locative Information in the node.
What did you do to get the phone/fax fields?
Comment #8
matt v. commentedmattyoung,
Maybe the difference in what we're seeing is because I'm using Location as a CCK field. That would also explain why I had to set up a "Content: Location - (field_location)" relationship and why you wouldn't see that option.
Comment #9
ajpiano commentedThis is definitely still a big bug. It definitely doesn't work with Views if you just use the locative information.
Comment #10
romand commentedI prefer to use CCK field for phone number, Location IMO just for location.
Comment #11
z33k3r commentedMy setup is not using the Location CCK field, but rather the Location module to implement the form within the node creation page. If I use the CCK field, I can see the CCK field data available within Views, but that doesn't help with my Location module and the implementation with Gmap.
Any ideas on when this will be getting addressed?
Comment #12
flexator commentedSame Problem here !
Comment #13
yesct commentedmarked #387198: No Phone Field in User Accounts as a duplicate of this issue.
#346694: Map Link Doesn't show up - phone problem also fixed might be related too
Comment #14
z33k3r commentedStill no progress?!
Comment #15
dhartman commentedI'm attaching this patch which is similar to the ones others have submitted for the 5.x branch. I'm still torn between this being a location field or using regular CCK fields. Almost seems like it would be better to just use CCK fields.
(whoops. I posted this in the wrong thread--the patch is not related to views)
Comment #16
izmeez commentedsubscribing.
I am having the same problem with both the fax and phone fields. I have enabled both submodules and it doesn't matter whether I create the location as a cck field or as a location on the node, the fields appear and I can enter a number but it does not display.
Thanks for all the work on this module. It sure does a lot well.
Izzy,
Comment #17
arosemartin commentedWe are also looking for this, subscribing. Thanks.
Comment #18
kirikintha commentedHey y'all - I had to do this, to make it show up. I'm sorry, I'm a git and don't know how to commit a real patch. But, this seems to work, I also had to add a 'help' part. If someone could direct me to the right place to make a patch to be reviewed, it would be awesome. I find that daunting for some reason. thanks!
Comment #19
mattyoung commentedhttp://drupal.org/patch
Comment #20
beanjammin commentedTo those wondering why the phone/fax fields are necessary:
When using a CCK phone field you are probably only working with one location per node, however if you are working with multiple locations within a node (ie if a node is a company and it has multiple locations), then it makes sense to have phone & fax (and URL as someone else suggested) included as part of the location as it is relevant and it provides the grouped fields necessary to be able to "add another location" and have all the necessary fields available for that new location.
Comment #21
agileware commentedThanks for the code kirikintha, seems to work for what I need.
Here is a patch based on your code that does phone and fax joins in their respective views.inc files.
Comment #22
ecksley commentedI'm now getting all the data when I select "Address" as my field. But I'm not seeing field options for a number of the individual address elements. For example, I see no state and still no phone.
In my case, I need more granular control of the address data than the standard "Address" output. I'm one of those poor souls that knows some PHP, but not module development... a designer type. Somehow with Views it often comes down to this with me:
1.) Build a tpl.php file
2.) Get the node ID
3.) node_load();
4.) No more missing fields
I would add to the discussion weighing CCK location VS Node location that Node Import only supports the latter. Although I find Node Location less in keeping with the "Drupal way"... What can you do.
Thanks
Comment #23
eojthebraveThe patch in #21 seems to be working well. I added a help argument to the phone field description so that views would not complain about missing help.
Comment #24
agileware commentedThe patch in #23 only adds help for phone, not fax
Comment #25
stefan81 commentedThank you folks.
With your patches and applying the fax help manually (#24), I got it running!:)
would be cool if someone can apply this patch to core.
Benjamin (#20),
if you need more fields, you can do it manually. Lets say you want to add a web address.
Go into the folder modules/location/contrib and duplicate, for example, the "location_phone" folder, then rename the folder and all files with "location_web" and do a search&replace in the files. phone > web. Descriptions you can change manually. Upload the new submodule, activate it and you are done :)
This way I added mobile numbers, web and mail addresses.
By the way: To get the links working just select "Output this field as a link" and fill "Link path:" with http:// (if an external Link) and the appropriate token ( see Replacement patterns further below). For a mail do "mailto:[mailtoken]"
Thats it :)
Comment #26
jax commentedPatch in #23 works for me and looks sane. It adds phone and fax.
Comment #27
bdragon commentedhttp://drupal.org/cvs?commit=303104
http://drupal.org/cvs?commit=303118
Committed, thanks.
Comment #29
lucascaro commentedThank You!