Error Source model “customer_entity/address_attribute_source_country” not found for attribute “country_id”

If you happen to encounter this error in magento 1.6 there is a chance that was caused by an upgrade from a previous version of magento.  Check eav_atribute table and change rows containing




Also if you check your error log for this error you might notice the cause:

Varien_Autoload::include(Mage/Customer/Entity/Model/Address/Attribute/Source/Country.php) [<a href='function.Varien-Autoload-include'>function.Varien-Autoload-include</a>]: failed to open stream: No such file or directory …

This entry was posted in Errors. Bookmark the permalink.

4 Responses to Error Source model “customer_entity/address_attribute_source_country” not found for attribute “country_id”

  1. Thank you Erik! This Bugfix saved me a lot of research! I’m looking forward to the next suprises the upgrade to 1.6. has prepared for me :)

  2. St Louis SEO says:

    I made these changes but am still seeing the same error. Do I need to clear cache or anything else? Cannot edit customer info.

  3. Kirill says:

    Do know how Magento converts the «_» names to directory/capital names?
    For example, where would it search for «module/subdirectory_file»?
    I supposed that it would look in /app/code/local/[package_name]/«module»/«subdirectory»/«file».php. But it stille gives me this error, that it can’t find the model.

    • erik says:

      Hi Kirill, first check that if the path given for the file is correct and the file really exists. Eventually work with cache disabled.

      The error of the post is caused by referencing a wrong magento path while the correct one is app/code/core/Mage/Customer/Model/Entity/Address/Attribute/Source.

      If you put the Mage core file in the local (e.g you intend the modify it’s code) it’s path will be app/code/local/Mage/Customer/Model/Entity/Address/Attribute/Source, containing Country.php and Region.php. If you will fire up your editor and open Region.php you’ll notice the class name Mage_Customer_Model_Entity_Address_Attribute_Source_Region which actually contains the path to the file.

      In this case we have in the Mage package (which can be core or localized) the Customer module, in it a Model class.

Leave a Reply

Your email address will not be published. Required fields are marked *

4 + = six

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>