Email and Name field disappears in my Commerce shop

Comments

bojanz’s picture

Addressfield 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.

bojanz’s picture

Status: Active » Postponed (maintainer needs more info)
sBonde’s picture

I 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. :-(

bojanz’s picture

Does that happen only for the initial selection? Or is the name field still gone when you change the country value?

sBonde’s picture

The 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.:-/

GemQueen’s picture

In 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.

GemQueen’s picture

OK, 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).

sBonde’s picture

Thanks a lot GemstoneLLC, seems to have solved my problem as well. :-)

artbussy’s picture

#7 helped me too.

Morten Andersen’s picture

#7 works for me too.

Kristina Katalinic’s picture

I 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.

flo81’s picture

I 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...)

joelcollinsdc’s picture

I 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.

IckZ’s picture

hm... 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?

bojanz’s picture

Title: Address field disappears » Empty default_country causes issues when the field is required
Priority: Normal » Critical
Status: Postponed (maintainer needs more info) » Active

  • bojanz committed e205aa5 on 7.x-1.x
    Issue #2415627: Empty default_country causes issues when the field is...
bojanz’s picture

Status: Active » Fixed

Committed a fix. I'll tag 1.1 shortly.

IckZ’s picture

thanks 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?

IckZ’s picture

Version: 7.x-1.0 » 7.x-1.1
Status: Fixed » Active
bojanz’s picture

Version: 7.x-1.1 » 7.x-1.0
Status: Active » Fixed

I'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.

IckZ’s picture

for everyone who gets the same error as mentioned in #18 : https://www.drupal.org/node/2478363

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.