Strange issue here. I think I may have deleted the shipping address field on orders, but not sure. In any case, the field is now gone.

Creating a replacement field manually doesn't hook back in, and I see no way to create the original field again aside from uninstalling/reinstalling the module, which isn't an option as there is data in the tables already.

Any help is much appreciated!

Comments

sjvellenga created an issue. See original summary.

rszrama’s picture

Status: Active » Closed (cannot reproduce)

Honestly, I've never encountered this situation before. I'm not sure what it looks like to reattach a field to a bundle it's been deleted from, but you'd likely need to recreate it using the API to use the same name it had previously. It may still be present with the "deleted" flag set to 1, so maybe you could undelete it? I'd google for "undelete a drupal 7 field" or something similar to see what turns up.

If you can't find it, I recommend posting the question at https://drupal.stackexchange.com.

sjvellenga’s picture

What I ended up doing was looking in the install file for the commerce shipping module, then pasting the code from that to create the field on the order into a php value in a block. Ran the block, then deleted it. The field was successfully recreated. I then had to place the field in the correct place in the displays and it populated back into the outputs (invoice included). I did have to manually fix the data that was lost in the table, but I simply duplicated from the billing field. Not a 100% ideal solution, but a solution.

rszrama’s picture

Wow, congrats for sorting it out!