CCK addresses fields not displayed in views

flebas - October 21, 2008 - 19:15
Project:Addresses
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:needs review
Description

Address fields are not displayed in views.

Query is OK, this is a theming problem.

If I select the default display, full address is displayed using the theme_addresses_cck_formatter_addresses function (see http://drupal.org/node/323961).

Selecting other display (city name, zip, country) display nothing, and no theme function is called.

Frederic

#1

flebas - October 22, 2008 - 21:37
Title:CCK addresses fields not dosplayed in views» CCK addresses fields not displayed in views

I have changed addresses_cck_field_formatter_info function in file addresses_cck.module (see http://drupal.org/node/323961).

Views are working a bit better, default view (complete address) is now displayed regardless of selected address field.

I presume some complementary code should be implemented to handle views address fields. I can do the work if someone gives me some clues to start.

Frederic

#2

Pancho - November 24, 2008 - 20:01
Version:6.x-1.0-alpha2» 6.x-1.0-alpha3
Priority:normal» critical

This bug is still open. I'd classify it as critical, as it renders the views implementation useless, except the admin patches the module or uses custom themeing. I need this for a project, so I might take a look at it the next days.

#3

Pancho - November 28, 2008 - 16:09
Status:active» needs review

While Flebas' quick fix was tied to specifically named fields, here's a generic solution!
Enclosed patch adds full views support for displaying single CCK fields and 'single line address' and some code and UI improvements.

AttachmentSize
addresses_views.patch 9.99 KB

#4

smoothdzion - December 18, 2008 - 23:49

Does anyone elses patch crap out on addresses_cck/addresses_cck.module? Pancho I appreciate the patch but it keeps dying on me.

#5

AntiNSA - December 23, 2008 - 19:05

Hi! I am trying to create an online learning thing and I want to give users the chance to create a content type, and chose the country and city for the content type they create, and then I create a list in views of the node title, city, and country in a table mode grouped by country.

I tried using addresses but every thing I do it says that it cant locate the provence and I should entry the country code. Way to hard for me and my students....

In the views I was able to add the field so it says country, city, contenent.... and even created a content type and added the fields to the content type....

I even went into the folder and cound the code for the city I live in in China and put the code in. I added the code to views and sadly it does not show the information . Only the node title and the titles for city country and continent, but bit the name. I cant create taxonomy for every city and country in the world, I cant ask my users for each and every code....

Is there some way to do this that doesnt kill me ? I thought addresses was it but I guess you have to be a sql genius hacker... I try my best...

Thank you for your help if you have any ideas

#6

AntiNSA - December 23, 2008 - 19:12

And does this patch work or not? I need to get this going, but I dont want to apply the patch if it is unknown to be ok.... that would make troubleshooting more difficult

#7

AntiNSA - December 24, 2008 - 00:12

I believe it is meant to be patched to the addresses_cck.inc file not the .module file

#8

AntiNSA - December 24, 2008 - 01:59

OK after playing with this for a while I realized that you made this patch for the non-released head version. The newest version for download is the alpha 3 version. I would like to use the head version, and have had no luck after looking for a couple of hours through the forum on how to download the head version. I need to be able to display the city only, and the country only, using cck/views and allow them to be sortable. I tried flebas and it displayed the city and the country together.... I believe your trying to do the same thing I am. I looked at you patch, dont know much about patching, used to used cyg win to patch files.
In you patch you patch multiple files, and I have only used cyg to patch a single file at a time..

So I looked at the patch which you made and sam that it is for a newer version than what is up to download. Can you please give me info on how to download the newest head version?

All I could find were the individual files at http://cvs.drupal.org and not a rar to download.This is a pretty important thing for me and I would be happy for the help.

I cant try your patch if I cant get the same head version you have to patch it.....

#9

AntiNSA - December 24, 2008 - 03:46

Ok , I downloaded the cvs of each file you had in the patch, one by one through copy and paste, made the changes, and completely lost the progress that was made on the other installation with fleba. Hours to learn what doesnt work.

Perhaps ts because I had only the pieces of the head version which you patched. It would be nice if the head version was available to download on the project page.

Now I will install it again with flebas mod.

Desperatly awaiting the ability to use this with views correctly....

#10

dotist - June 4, 2009 - 14:43

subscribing

#11

AntoineSolutions - November 26, 2009 - 05:00
Version:6.x-1.0-alpha3» 6.x-1.x-dev

I have taken the patch from #3 and updated it against HEAD, thus I am changing the version to 6.x-1.x-dev. I have also included additional fixes not in the patch from #3.

The patch removes all of the duplicate fields in the views selection list replacing it with one Addresses field. This Addresses field has many formatters that allows you to get the output you wish desire whether it be the complete address (default) or a single address field. To get multiple single fields, add the Addresses field to a view multiple times choosing the correct formatter for the desired field.

If you test this patch, please provide feedback. We get nowhere without tester feedback.

Cheers,

Antoine

AttachmentSize
addresses-324331_2.patch 11.01 KB
 
 

Drupal is a registered trademark of Dries Buytaert.