Address name not showing in node view

stg11 - February 15, 2009 - 02:53
Project:Addresses
Version:6.x-1.05
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:reviewed & tested by the community
Description

Address is all showing fine except the name field. I originally did not have it turned on. I turned it on, entered a value in name and the node retains it (shows when I re-edit it) but does not show when viewing the node and not in a view either. I made sure in content type field management that the display was set on.

I think it may have something to do with the fact that I originally did not have it turned on when I defined the field in the content type. Or perhaps I'm missing something?

#1

nonsparker - March 14, 2009 - 15:26

I am Having the same issue

#2

goodeit - March 29, 2009 - 04:06

subscribing.

#3

gjvoosten - April 23, 2009 - 12:27

Patch (one-line change).

AttachmentSize
addresses.patch 459 bytes

#4

gjvoosten - April 23, 2009 - 12:28
Status:active» needs review

#5

goodeit - April 25, 2009 - 07:15

wow, good find! Patch works for me, name seems to display fine.

Thanks!

#6

Phylock - April 30, 2009 - 15:20

I would remove the $values['primary']as well, its an unknown variable and if its the $aname['is_primary'] its referring to, it's a boolean value and it can't be printed out the way.

AttachmentSize
addresses1.patch 472 bytes

#7

mrtoner - May 21, 2009 - 15:58
Status:needs review» reviewed & tested by the community

Confirmed independently.

#8

dboulet - June 4, 2009 - 21:15

Patch in #6 works well, thanks.

#9

paul o brien - June 24, 2009 - 06:02

addresses1.patch did not work for me, maybe because i am using a template.

this is my code:

<?php

   
if ($node->field_procedaddress2[0]['aname']) {echo $node->field_procedaddress2[0]['aname'] .", "; }
    if (
$node->field_procedaddress2[0]['street']) { echo $node->field_procedaddress2[0]['street'] .", "; }
    if (
$node->field_procedaddress2[0]['additional']) { echo $node->field_procedaddress2[0]['additional'] .", "; }
    if (
$node->field_procedaddress2[0]['city']) { echo '<br/>'. $node->field_procedaddress2[0]['city'] ; }
    if (
$node->field_procedaddress2[0]['postal_code']) { echo "  ". $node->field_procedaddress2[0]['postal_code'];
}
?>

All printed except Address Name. the problem is 'aname'. change to 'name' and all is fine.

#10

budda - November 6, 2009 - 02:37

patch in comment #6 worked for me. Been tracing addresses module for ages to find it, then discovered a patch already!

 
 

Drupal is a registered trademark of Dries Buytaert.