I hate to sound harsh....but before I dive into depending on this module to round up user data on thousands of users, I need to be sure it's useful in the future for what I need.

Am I right in saying that these fields can't be accessed with Views/Views2? I tried to create a view and list address fields...no go.

Am I also right ins stating that they don't become real Profile fields? I don't see them listed at /admin/user/profile once they've been activated and collecting data.

So if they can't be accessed by Views onr can they be used by the core Profile module (and use with things like the Advanced User module (which depends on core profile fields to filter users), what good is this module.

Like I said, I hate to sound harsh but I just can't figure out how to unleash the power of this module. All it'd done for me so far was save me from manually creating profile fields. But if I can't re-purpose the data, it's of no use.

Thanks for steering me in the right direction if I am wrong on all of this.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

JamesAn’s picture

I'm stuck on this as well. For users, the address fields neither show up in the list of profile fields nor in the list of fields for views.

If you use the address module with nodes, things work much smoother. Addresses show up in the list of fields under the node and in views under arguments, filters, and fields in the content group.

I don't know why this ability isn't available for addresses used in users. For now, I guess a work-around could be to use the beta Content Profile.

iant’s picture

I've just come across this problem too I want to to be able to access addresses in views2, but if I use this module - which is good, but doesn't seem to be localised for the UK (state/province vs county postal code vs postcode). I can't make use of the data I collect anywhere.

I'd happily help with the localisation issue if I could find where the information is stored, but what is the point if I can't access the data that I collect from users with modules such as views?

Looking into the database I see that there is a table addresses_user with addresses in it however this appears to contain duplicate entries with some "addresses" having 2 rows and some having only one.

This seems like this could be really useful module if it could be integrated better with views etc.

JamesAn’s picture

I've adopted Content Profiles successfully to replace the core profile completely.

It creates a profile content type and each user manages a single profile node. Using CCK, I've reproduced all the fields I need for user profiles.

I don't know how to batch-migrate user profiles to content profiles...

brmassa’s picture

Title: questioning the usefulness of this module » User addresses with Views integration
Assigned: Unassigned » brmassa

Guys,

the user addresses is not profile fields because the API was too much simplistic. It was not possible to implement the interaction between addresses fields (country with state for example). So it adds directly to user pages.

And i must disagree that inexistence of Views integration make the module useless. You still could load it and use this info in other ways, like eCommerce module does.

I am, however, working on the integration of Addresses User and Views module. Soon it will be done.

regards,

massa

Paul Gaskin’s picture

Good work on this module, Bruno.

I can tell this module is a serious under-taking.

JamesAn’s picture

Just popping in one week later. Sorry, I didn't mean to come across agreeing that this module is useless.

Using content profile to move profile data into nodes has been working out well, granted I didn't have much existing data to migrate.

I think the debate really concerns the larger issue of how (or why) Drupal handles profile and node data differently.

deviantintegral’s picture

Version: 6.x-1.03 » 6.x-1.x-dev

I think what's supposed to happen is that Views will pick up on the default CCK formatters; there are various formatters (it appears) for each field in an address, but it looks like Views is also picking up on each subfield within an address. I think it needs to be one way or the other; either you have one or two formatters which work on most subfields, and have multiple Views field per address field, or you have one Address field with different formatters to pull out the right data.

I'm pretty raw when it comes to CCK / Views integration, but may as well learn, as I need this for a project, and addresses + content profile is 99% of the way there :)

deviantintegral’s picture

Status: Active » Needs review
FileSize
2.31 KB

Here's a patch which makes Views integration much more usable. What was happening is that there were no theme functions for CCK-rendered fields. This patch generates a list of fields, and adds a single function which then routes the theme off to the appropriate function. This means that by default, CCK-rendered fields will look just like normal fields, but it's possible to theme CCK fields differently if needed.

If you apply this patch, remember to reload the modules page to rebuild the theme registry.

iant’s picture

So having read through thread this I am still confused. This module still does not (as yet ) provide any integration with views and that the only work around is to use profile or content profile (which option would be better in a scenario where I am using a combination of content_profile and autoassignrole to collect differing fields from users with differing roles given that I want addresses from all users?) to duplicate what this module can to in terms of collecting user addresses at registration without much of the useful validation that this module offers ?

How far away is the views integration for addresses? I tried the patch above but must be missing something. I'm keen to use this module as it seems good but need to get my site up soon and so don't want to put a lot of effort into reinventing a wheel that someone has nearly finished making ? If I can wait a short while and use my skills elsewhere.

Thanks

Ian

micheleannj’s picture

subscribing

white_pawn’s picture

Component: User interface » Code

I'd like my users to be able to search for people based on their location, and it appears that either the Addresses module still doesn't provide this functionality through Views, or I'm missing something. Any news on this?

AlexisWilke’s picture

Title: User addresses with Views integration » Views integration of all addresses
Assigned: brmassa » Unassigned

White pawn,

Can you search views?!

At this point, there is absolutely no support for views.

Thank you,
Alexis Wilke

white_pawn’s picture

I'm not sure I got your question. If you're asking if it's possible to do a content/user search using Views, then yes (through exposed filters). That's why I need this functionality.

AlexisWilke’s picture

Status: Needs review » Active

White pawn,

Okay, that makes sense. 8-)

I never used exposed filters (I tested and saw what it does, but never had a use for them.)

I would think we can join to the User's system. I suppose that #8 is not helping in your situation?

Thank you.
Alexis

MasterChief’s picture

Hi AlexisWilke,

he would be great that Adresses will integrate Views 2 and 3.

User's system for me it's a good choice.

An example is a view members list which make appear the country of each user. (replacing the name by a flag will be even better!)

Very usefull no ? :)

white_pawn’s picture

I haven't tried #8, since that one appears to be a patch for addresses_cck, and I need one that would fix addresses_user (there's already some sort of User system integration). Now, if you think you should move to the Profile system, then I guess there should be a way to migrate the existing (User-related) information to the Profile system. However, that could be an overkill, and for the time being, I think "simply" integrating the existing addresses_user module with Views would suffice.

AlexisWilke’s picture

Title: Views integration of all addresses » Views integration of user addresses
Assigned: Unassigned » AlexisWilke
Issue tags: +views support

Okay, there is version 0.1... 8-)

It should appear within 12h.

We have to fix the country/province display (that is, offer the full name as well).

And maybe add support for the country flag, that would go for all displays... There is a module with i18n that includes all the country flags. We could look into supporting that. But that's a lot of work.

Let me know how that works for you. You need to install the new addresses user views module.

Thank you.
Alexis

MasterChief’s picture

Hi AlexisWilke,

i just try the new version, but i have a problem nothing appear in the user edit profile and nothing too in the registration form.

So it's a big problem no?

In administration i have activated "Address fields on the user registration form".

Addresses, Addresses-Users and Addresses User Views are activated.

I am using Drupal 6.19, Content Profile 6.x-1.0 and CCK 6.x-2.8.

When this problem will be fixed i will test the Addresses User Views part :)

AlexisWilke’s picture

MasterChief,

I noticed that too. I still don't understand why massa would not always include the user address in your user edit area...

I tested with the Address Book. Were 1.09 and 1.10 working right in that regard? Because I did not change anything other than adding the views support. So it should have no effect on the addresses.

Thank you.
Alexis

MasterChief’s picture

Hi again,

I can't confirm that 1.09 and 1.10 worked before because i had test this module but a little time ago before 1.09 if i remember well and i had not this problem!

AlexisWilke’s picture

Okay, I think we ought to have two flags so the admin can choose to always show the user his address in his account... but I need to find out why it's gone in the first place.

Thank you.
Alexis

white_pawn’s picture

Great job! Thanks! I hope you can fix the country/province display.

MasterChief’s picture

Did you identify what causes the disappearance of the display of the addresses ?

MasterChief’s picture

Hi AlexisWilke!

Did you find the problem ?

AlexisWilke’s picture

I have not found time to work on the Addresses module...

TonyxTony’s picture

I am not sure if this is fixed or not.

So far the module works great in terms of User Address. However I am having Trouble to pull that information and display it in a View.

I need to find a way to pull each User's Country and display them under their Profile in a View.

Would someone be able to assist me?

I have tried creating a CCK field which sets a Default value. However I dont know how to pull the user's information.

Thanks

TonyxTony’s picture

I have got it working for Views.

Here is how I have done it.

I used the field UID and custom altered the template output.

Had to create a new field called "views-view-field--uid.tpl.php" Used this code inside the file.

$user = user_load($output);

print $user->addresses['city']; echo ' '; print $user->addresses['postal_code'];

Then I was able to pull any info on the user.

Hope this help

dkinzer’s picture

The addresses fields exposed to views seem like they are all lumped together. Am I right in assuming I can't just ask for a view showing the streets or zip-code without any other address attribute exposed, including a label? Or then be able to sort just by that value?

AlexisWilke’s picture

dkinzer,

Indeed, the addresses module generates a label, and as far as I know, the views generate another by default.

The addresses module should have a way to indicate whether labels are to be pre-pended or not.

Thank you.
Alexis Wilke

dkinzer’s picture

Thanks, Alexis. Please see my post at @ #324331-28: CCK addresses fields not displayed in views.

As I needed to be able to create views tables with sortable individual fields from the addresses compound field, I've created a patch to help do this. I posted it on that issue as it looks like it probably belongs there.

Regards,
D