Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Email and Name field disappears in my Commerce shop
Email and Name field disappears in my Commerce shop
Comments
Comment #1
bojanz CreditAttribution: bojanz commentedAddressfield does not render any email fields.
As for the name field, you would need to provide much more than 1 sentence if you want us to be able to help you.
Comment #2
bojanz CreditAttribution: bojanz commentedComment #3
sBonde CreditAttribution: sBonde commentedI am experiencing the same issue. The name field has disappeared from the checkout form. This happened after upgrading to latest version on the 25th of January.
The widget is set to show Full name single line and tried adding First name, Last name field but nothing changed on the checkout form.
Even if I am logged in as admin the name field is still not visible.
I really hope that someone can help since I am receiving a lot of orders with no name and no address at the moment, so no idea where to send the products. :-(
Comment #4
bojanz CreditAttribution: bojanz commentedDoes that happen only for the initial selection? Or is the name field still gone when you change the country value?
Comment #5
sBonde CreditAttribution: sBonde commentedThe country field is hidden since there is only one country available. But changing the widget to display the country did'nt show the country field on the checkout page. It does'nt seem like anyting I change to the address field widget is being shown in the frontend.:-/
Comment #6
GemQueen CreditAttribution: GemQueen commentedIn my case, I have a node that is filled out as part of a membership that is paid for via ubercart. the address field is required. After the latest update, the contents of the address field are not saved. I am using UC Node Checkout to handle the membership form.
Comment #7
GemQueen CreditAttribution: GemQueen commentedOK, I may have stumbled on the answer. When I was checking out my field settings for my membership content types, I noticed that I have one country (USA), and the box checked that says "Hide the country when only one is available". I noticed that the default country was "None", and so I changed the default to United States, and that seems to have resolved this problem!
I checked another site that isn't live yet, so I could play around with it with errors on, and that is exactly what is happening. I have an address field, with only one country, with the option to not display the country field. the default is "none" instead of the one selected country, so when you try to save the form, it gives a "Notice: Undefined index: #default_value in addressfield_standard_country_validate() (line 594 of /var/www/drupal7/sites/all/modules/addressfield/addressfield.module)." error, but saves the form anyway, minus the address field.
So it seems to me, that instead of just setting the default country to "none", when update.php is run, it should set it to the selected country if there is only one country in pre-existing content types (or any other entity that has a address field I'm guessing).
Comment #8
sBonde CreditAttribution: sBonde commentedThanks a lot GemstoneLLC, seems to have solved my problem as well. :-)
Comment #9
artbussy CreditAttribution: artbussy commented#7 helped me too.
Comment #10
Morten Andersen CreditAttribution: Morten Andersen commented#7 works for me too.
Comment #11
Kristina Katalinic CreditAttribution: Kristina Katalinic commentedI have multiple countries available but if I do not select a default country the Name field is not shown. It is only shown after a country is selected.
If I have a default country selected in my store settings (billing information) then Name field is shown on checkout form as well.
Comment #12
flo81 CreditAttribution: flo81 commentedI had a similar problem, after upgrading Drupal to 7.36 and Address Field from 7.x-1.0-beta5 to 7.x-1.0. When I choose a country the whole address field disappears (removed from DOM).
#7 helped : in my use case I could limit countries to only one, and I checked "Hide country when only one is available". Still I would be interested in understanding what is happening (I run a Drupal Commerce, and Address Field is an important part of checkout process...)
Comment #13
joelcollinsdc CreditAttribution: joelcollinsdc commentedI think i'm probaby jumping on the wrong issue thread here, but we had a similar issue.
Available Countries: United States
Default Country: -none-
Resulted in some sites (?) defaulting to the wrong (none?) country. The end result was it looked like the city and state were missing, but deeper investigation made it seem like a Postal Code was being requested like it was defaulting to the UK or something.
*edit*, the reason that we dont have Default Country as "United States" is because it makes the field required.
Comment #14
IckZ CreditAttribution: IckZ commentedhm... I've a similar problem since updating to the latest version:
Although all fields are shown up but if you fill out the fields for the first time and click on "continue" during the checkout the form throws errors with the advice to fill out all necessary fields althoughthey are filled out correctly before.
In the logs I get this notice:
Notice: Undefined index: #default_value in addressfield_standard_country_validate() (line 594
My settings:
Available Countries: more than one..
Default Country: Germany
Any Ideas?
Comment #15
bojanz CreditAttribution: bojanz commentedRetitling. Marked #2416143: No Full name field for Afghanistan (when initially shown) as duplicate.
Comment #17
bojanz CreditAttribution: bojanz commentedCommitted a fix. I'll tag 1.1 shortly.
Comment #18
IckZ CreditAttribution: IckZ commentedthanks for fixing this so fast! But there seems to be another problem since I've updated to the 1.1. Version.
Now I get almost the same error but in another line:
Notice: Undefined index: #default_value in addressfield_standard_country_validate() (Line 602 von .../addressfield/addressfield.module).
Any Ideas if this is still the same issue?
Comment #19
IckZ CreditAttribution: IckZ commentedComment #20
bojanz CreditAttribution: bojanz commentedI've fixed the issue that I reproduced in this issue.
Let's open a new one for your error, with a complete description of how your field is configured and what you're doing to reproduce it.
Comment #21
IckZ CreditAttribution: IckZ commentedfor everyone who gets the same error as mentioned in #18 : https://www.drupal.org/node/2478363