This might sound a bit silly, but even though the addressfield is called addressfield, you don't actually have to use it for storing addresses, you can limit it to storing name and/or company name. It happened to fit my use case, since I don't need to store addresses during checkout I thought it was easier to just use it for storing the name which I did need.
Doing this I've found this strange bug, that I'm guessing has something to do with the way customer profile saves the address. I remember that some strange things are going on there.
Anyways the actual bug is that if you don't have the address part enabled in the address field, the addressfield won't actually save the name. What's worse is, that is a name is already stored (temporarily turning the address on, entering data, turn address off and go back), the name will be deleted if the form is submitted again.
So clearly something whacky is going on.
Ryan do you have any hunches, been a long time since I looked at the customer profile and addressfield interaction.
Comments
Comment #1
amateescu commentedTested this with an address field attached to a node and I experienced the same behavior. Moving to the Address Field queue.
Comment #2
phuybre commentedIn addressfield.module, it checks for empty fields
Quick Fix: Change the line to return empty($item['name_line']); and it should work.
Of course, a proper fix would check the configuration of this addressfield instance and react accordingly.
Comment #3
Robin Millette commentedSee: