Sometimes shipping and/or billing address is missing Unfortunately I have to ask a pretty vague question, and I can't provide much background because I can't reproduce.

Working on a Drupal 7 Commerce install with Domain Access we are (seemingly) randomly missing shipping and/or billing information on orders.  Sometimes the order has a billing name (or shipping name) but no address information.  Others, either shipping or billing is completely missing from the order view.

This is happening on ~1% of orders and I can't find any way to link them with consistency.  It has happened on PayPal Express Checkout orders, Authorize.net orders, orders with different shipping methods, orders from different domains, etc.  The stored API responses from the payment processors are normal.

In testing (on production), I can't reproduce; I've tried both payment methods, anonymous accounts, existing accounts, etc.  I can't even get past the Billing/Shipping form without completing all the information, no matter what I've tried.

Hopefully someone has experienced this before; if not, I'm totally open for "try this" or "look here" suggestions.

Thanks
I've had similar problems before, never did get to the bottom of it. I think it's related to the Commerce Addressbook module and the way it copies profiles but time ran out before I could confirm.

As a rather hacky (but effective) workaround I used the following to make sure the profile had been copied:

function MYMODULE_form_commerce_checkout_form_checkout_alter(&amp;$form, &amp;$form_state, $form_id) {
  $form['buttons']['continue']['#submit'][] = 'MYMODULE_commerce_checkout_form_submit';
}

function MYMODULE_commerce_checkout_form_submit($form, &amp;$form_state) {
  // If the copy address checkbox is selected.
  if ($form_state['values']['customer_profile_shipping']['commerce_customer_profile_copy']) {
    $order_wrapper = entity_metadata_wrapper('commerce_order', $form_state['order']);
    $shipping_address = $order_wrapper-&gt;commerce_customer_shipping-&gt;commerce_customer_address-&gt;raw();
    $billing_address = $order_wrapper-&gt;commerce_customer_billing-&gt;commerce_customer_address-&gt;raw();

    // If the shipping and billing address aren't the same then we need to fix it.
    if ($shipping_address != $billing_address) {
      $order_wrapper-&gt;commerce_customer_shipping-&gt;commerce_customer_address = $billing_address;
      $order_wrapper-&gt;commerce_customer_shipping-&gt;save();
    }
  }
}


It may or may not work as-is, but even if not it might provide a starting point for debugging.