Was initially using the beta3 code and decided to try the dev to see if this had been fixed first, but no luck. If i use addressfield on a Profile2 entity, if I edit the Profile2 entity and make no changes to the addressfield being used for the user's location(s), I get an additional empty fieldset each time I save this. See screenshot, but there are several more blank ones below the ones you can see there as well...

Comments

scotwith1t’s picture

I see this may be a duplicate of #1263316: Configurable non-empty value conditions but applied the patch there and no luck. Wondering if there's more to be done there to make this work with profile2 (and other custom) entities? Leaving open for feedback...

johnv’s picture

Status: Active » Postponed (maintainer needs more info)

I'm pretty sure this is solved by #1844846, since your symptom also happens without using Profile2, (just using a field on an entity)

I'm a little confued by " I get an additional empty fieldset each time I save this."
Are you getting a second, third, ... addressfield after each save? Or only one?

rszrama’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)

I think you're right that it's a duplicate. The reason he's seeing additional empty values each save is that he's using an "unlimited" cardinality for the field, so on each build of the form it's creating a value for the "next" address to be entered. When he saved, that gets saved as if it were a real address value, and the subsequent rebuild of the form creates a new empty value ad infinitum. Nasty business. : P