Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Magento - Customer Address Country Dropdown Issue

I'm using Magento CE 1.7.0.2, having recently upgraded from 1.4.2.0. And when editing/creating a customer address in the backend, the country dropdown field is blank - with no possible options to select. Neither does it work on the frontend address dropdown.

Any ideas what's caused this, the only code hint I could find is: "this.defaultCountries = [false,false];" in the JS on the page, whereas on a new Magento install (same version, same default country) it shows: this.defaultCountries = ['GB','GB'];

like image 384
mattpark22 Avatar asked Nov 27 '22 14:11

mattpark22


1 Answers

We ran across a similar issue, but ours started happening after everything had been functioning properly.

What we found was that in the core_config_data table, for some reason, there came to be an entry in there with a path of "general" (with nothing after it, or maybe "/general/")...

Point is, since it was one of the last entries, Magento treats that as create (in this case overwrite) the XML node "general" in the core_config that it builds, essentially wiping out all other data in that branch of the XML object.

If you find this entry in the table, you should backup the table (always be safe), and remove that entry. Then clear your cache, and you should find that things are back to normal.

We never did identify HOW the entry came to exist in the table, but that was the fix for us.

like image 86
Rand Avatar answered Dec 05 '22 21:12

Rand