Hello,
I have problems with latest CVS version : CCK addresses are saved but are not displayed.
User addresses work OK.
I have traced display problem. It seems that #theme (line 2754 in includes/common.inc) is set to addresses_cck_formatter_addresses and that this theme function is not implemented.
I do not know enough in Drupal internals. I have added a theme_addresses_cck_formatter_addresses function in addresses_cck.inc and an entry for this function in addresses_cck_theme in address_cck.module.
It works now, but not elegant at all. Best should be to change the value of #theme, but I don't know how to do it, and it is late !
Please note that Fieldset modification (Alexis patch) does not work with CCK (form data is not saved). For CCK, I think it is better to use a CCK group if a fieldset is needed, and thus make fieldset display optional with this option set to false in case of CCK use.
Frederic
Comments
Comment #1
flebas commentedHello,
I found the origin of display problem : in addresses_cck_field_formatter_info function (file addresses_cck.module), the first item in $formatters array should be 'default' instead of 'addresses'.
Frederic
Comment #2
SimonVlc commentedHi there,
I have the same problem and was unnable to solve it modifying with that code Frederic.
Just to inform!
Comment #3
nokes commentedI made this change today, and it solved the problem. However, it's worth noting that I had to go to the content type's Display Fields tab and Save it again before I started seeing the changes in the nodes that I had already created. SimonVic...you may want to try that if you haven't already.
Comment #4
zoltán balogh commentedCode in #1 works fine. Thx.
Comment #5
phdhiren commentedCode on #1 work for me too, but after saving the display field tab settings again. thanks flebas.. :)
Comment #6
phdhiren commentedComment #7
brmassa commentedFrederic and guys,
thanks for the patch. Commited. Soon on the next release.
regards,
massa
Comment #8
unitec commentedThe patch does not work for to display address fields in views.
Comment #9
mcjudd commentedHi Guys
The fix in #1 does not see to work for me. Have tried re-saving the content type (#3), but no luck??
Any ideas?
Comment #10
flebas commentedI have got Views to work. It seems that current code is incomplete. I think massa will udate it in a future release.
1) In function addresses_cck_theme, in addresses_cck.module, add entries for the fields you want to display in views :
2) in addresses_cck.inc, add the theme functions for each field :
You need to disable then enable the addresses modules and to clear views cache for changes to take effect.
Frederic
Comment #11
flebas commentedTo mcjudd : you have to disable the enable addresses modules in admin/modules.
Comment #12
mcjudd commentedHi Flebas
That's works for me too now/
Thanks for your help
Comment #13
mcjudd commentedHi Flebas
Just one other thing now that I have updated the address module the address fields now shows, but not the State / Province, phone, fax fields.
Have you got a solution for this one (or experienced this one)?
Thanks once again
Comment #15
AntiNSA commentedwould be nice to have this in cck display only the city in a field, and then only one for the country, and then only one for the provence , on one line, which could be sorted by field.....
Comment #16
AntiNSA commentedI have the following :City:
Guangzhou
,
Province:
Guangdong
Country:
China
listed in one column, and its not sortable.... I need to have one field from each.... and sortable, and grouped by country let me know.... and why is there no field for continent?
Comment #17
Mark_Watson27 commentedThe alteration suggested by flebas worked for me, yet I see it hasn't been implemented in a release as yet, will this be rolled in to a general release?