Rhapsody Posted December 20, 2011 Share Posted December 20, 2011 I have a shop currently at 1.4.6.2 that has been upgraded many times since the original install running 1.3. I noticed a problem when an existing user tries to add an address. This may not be a 1.4.6.2 problem as it may have been there previously, but just noticed. Here are the symptoms. 1. User who is logged in FO selects "My Addresses" in the "My Account" block. 2. User is able to update and save an existing address with no problem. 3. User attempts to add a new address - the form opens but there is no field for state or country displayed. 4. If user enters data and clicks save, a white screen and "Fatal Error" is displayed. 5. I have an override for AddressController.php that I removed for testing - same problem without the override Things I've looked at: 1. When a user creates an account, the state and country fields are displayed and the data is saved properly 2. When adding an address in the BO, all the proper fields are displayed and the records saves properly 3. Enabling "Debug" in config.inc.php didn't display anything when the fatal error is displayed 4. I have a custom theme, but to test this, using the stock Prestashop theme has the same fatal error. How can I debug this to find the source of the problem? Updated 30 Dec 2011 - Problem solved. Somehow the ps_address_format table was corrupted. I was able to drop the corrupted table and used one to replace it from a clean 1.4.6.2 install. All works fine again. Link to comment Share on other sites More sharing options...
tomerg3 Posted December 20, 2011 Share Posted December 20, 2011 Edit /config/defines.inc.php line #28 and set _PS_MODE_DEV_ to true Then try again, and post the results (as a text file) if you're not sure what is the cause. Link to comment Share on other sites More sharing options...
Rhapsody Posted December 20, 2011 Author Share Posted December 20, 2011 That was a fast reply! Here is what I get when adding an address: Array ( [0] => Array ( [file] => /home/chnycus/public_html/shop/override/controllers/AddressController.php [line] => 70 [function] => displayError [class] => ToolsCore [type] => :: [args] => Array ( ) ) [1] => Array ( [file] => /home/chnycus/public_html/shop/classes/FrontController.php [line] => 63 [function] => preProcess [class] => AddressController [object] => AddressController Object ( [auth] => 1 [guestAllowed] => 1 [php_self] => address.php [authRedirection] => addresses.php [ssl] => 1 [_address:protected] => [errors] => Array ( [0] => country ID is required. ) [iso] => [orderBy] => [orderWay] => [p] => [n] => [restrictedCountry:protected] => [maintenance:protected] => ) [type] => -> [args] => Array ( ) ) [2] => Array ( [file] => /home/chnycus/public_html/shop/address.php [line] => 29 [function] => run [class] => FrontControllerCore [object] => AddressController Object ( [auth] => 1 [guestAllowed] => 1 [php_self] => address.php [authRedirection] => addresses.php [ssl] => 1 [_address:protected] => [errors] => Array ( [0] => country ID is required. ) [iso] => [orderBy] => [orderWay] => [p] => [n] => [restrictedCountry:protected] => [maintenance:protected] => ) [type] => -> [args] => Array ( ) ) ) Link to comment Share on other sites More sharing options...
Rhapsody Posted December 20, 2011 Author Share Posted December 20, 2011 I've removed the addresscontroller override and get this error dump: Array ( [0] => Array ( [file] => /home/chnycus/public_html/shop/controllers/AddressController.php [line] => 93 [function] => displayError [class] => ToolsCore [type] => :: [args] => Array ( ) ) [1] => Array ( [file] => /home/chnycus/public_html/shop/classes/FrontController.php [line] => 63 [function] => preProcess [class] => AddressControllerCore [object] => AddressController Object ( [auth] => 1 [guestAllowed] => 1 [php_self] => address.php [authRedirection] => addresses.php [ssl] => 1 [_address:protected] => [errors] => Array ( [0] => country ID is required. ) [iso] => [orderBy] => [orderWay] => [p] => [n] => [restrictedCountry:protected] => [maintenance:protected] => ) [type] => -> [args] => Array ( ) ) [2] => Array ( [file] => /home/chnycus/public_html/shop/address.php [line] => 29 [function] => run [class] => FrontControllerCore [object] => AddressController Object ( [auth] => 1 [guestAllowed] => 1 [php_self] => address.php [authRedirection] => addresses.php [ssl] => 1 [_address:protected] => [errors] => Array ( [0] => country ID is required. ) [iso] => [orderBy] => [orderWay] => [p] => [n] => [restrictedCountry:protected] => [maintenance:protected] => ) [type] => -> [args] => Array ( ) ) ) Link to comment Share on other sites More sharing options...
tomerg3 Posted December 20, 2011 Share Posted December 20, 2011 [0] => country ID is required. It looks like you're not sending in a country... Link to comment Share on other sites More sharing options...
Rhapsody Posted December 20, 2011 Author Share Posted December 20, 2011 I don't understand why the country id isn't being sent. If I remove the override and use the stock Prestashop template, it is a normal configuration. Notice item #3 in my summary: 3. User attempts to add a new address - the form opens but there is no field for state or country displayed. How can I debug that to see why the field for country and state are not displayed? I think that's the path to solve this. Link to comment Share on other sites More sharing options...
tomerg3 Posted December 20, 2011 Share Posted December 20, 2011 They were likely removed from http://screencast.com/t/JaHDRz5b7Soa Link to comment Share on other sites More sharing options...
Rhapsody Posted December 20, 2011 Author Share Posted December 20, 2011 This is what I have for the US address definition (includes both states and Country): firstname lastname company address1 address2 city, State:name postcode Country:name phone phone_mobile I am able to edit existing addresses, and the invoices print properly Link to comment Share on other sites More sharing options...
tomerg3 Posted December 20, 2011 Share Posted December 20, 2011 Could be a problem with your theme... At least now you know what is causing the error. Link to comment Share on other sites More sharing options...
Rhapsody Posted December 20, 2011 Author Share Posted December 20, 2011 I thought that and tried the stock Prestashop theme with the same problem. I'm stumped! also tired... tomorrow is another day. Link to comment Share on other sites More sharing options...
Rhapsody Posted December 31, 2011 Author Share Posted December 31, 2011 Problem solved - the following was added to the original post Updated 30 Dec 2011 - Problem solved. Somehow the ps_address_format table was corrupted. I was able to drop the corrupted table and used one to replace it from a clean 1.4.6.2 install. All works fine again. 1 Link to comment Share on other sites More sharing options...
hoursoffun Posted June 28, 2012 Share Posted June 28, 2012 Hi We are currently having the same problem with no country showing on the drop down menu on the account set up page. We have tried various things as suggested above and have been advised it may be a corrupted table. Please can you advise how we can locate the corrupted table and how we replace it. thanks rachel Link to comment Share on other sites More sharing options...
glennlawre Posted November 27, 2012 Share Posted November 27, 2012 (edited) This solved this issue for me - http://www.prestashop.com/forums/topic/174926-creating-a-new-account-address-country-drop-down-is-empty-causing-error-message/ Hi rachel, In your Back Office, please go to Shipping > Countries and select the UK. There, please check if Country:name is listed under "Address Format." If not, that is likely the cause of your error. I hope this helps. -Mike Edited November 27, 2012 by glennlawre (see edit history) Link to comment Share on other sites More sharing options...
SonnyBoyII Posted September 7, 2014 Share Posted September 7, 2014 Problem solved - the following was added to the original post Updated 30 Dec 2011 - Problem solved. Somehow the ps_address_format table was corrupted. I was able to drop the corrupted table and used one to replace it from a clean 1.4.6.2 install. All works fine again. I have exactly the same problem with the ps_address_format after upgrading from version 1.4 to 1.6 !!!! Corrupted data !!! Thank you !!! Link to comment Share on other sites More sharing options...
svapolibero Posted April 16, 2015 Share Posted April 16, 2015 I need to solve same problem.. how i can obtain a ps_address_format for 1.4.9 clean version? Thx Daniele Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now