Closed (duplicate)
Project:
Address Field
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Mar 2013 at 06:19 UTC
Updated:
17 Apr 2013 at 21:56 UTC
From _addressfield_render_address() in addressfield.module:
// Add #prefix and #field_suffix to the prefixes and suffixes.
if (isset($child['#prefix'])) {
$child['#prefix'] = (isset($child['#prefix']) ? $child['#prefix'] : '') . $child['#prefix'];
}
if (isset($child['#field_suffix'])) {
$child['#suffix'] = (isset($child['#suffix']) ? $child['#suffix'] : '') . $child['#field_suffix'];
}
The result is that fields are suffixed with both #suffix and #field_suffix as they may be set, but fields are never prefixed with #field_prefix. But if #prefix is set, then the field is prefixed with #prefix concatenated with itself!
The patch changes the prefix behavior to match the suffix behavior.
| Comment | File | Size | Author |
|---|---|---|---|
| addressfield-rendered-field-prefixes.patch | 866 bytes | Garrett Albright |
Comments
Comment #1
Garrett Albright commentedSet to "needs review" since I've provided a patch.
Comment #2
johnvI guess you better contribute to one of these older issues:
#1232608: Don't duplicate addressfield element prefixes or use non-breaking space prefixes for inline elements
#1410612: Double #prefix problem
#1482802: Prefix Duplication in plugin
Comment #3
Garrett Albright commentedAh, didn't know about any previous issues. Thanks for that; glad to know I'm not the only one running into this problem.