kilrathi Posted October 18, 2010 Share Posted October 18, 2010 I recently changed server, and upgraded my prestashop to the latest version. Now my site works fine. Only after login as CUSTOMER, a text FATAL error comes up at the bottom of the center section.Also, all the categories are showing, but the sub-categories images/data is NOT there ...Please help! Link to comment Share on other sites More sharing options...
rocky Posted October 19, 2010 Share Posted October 19, 2010 Temporarily change line 403 of classes/Tools.php (in PrestaShop v1.3.2) from: // if ($string == 'Fatal error') d(debug_backtrace()); to: if ($string == 'Fatal error') d(debug_backtrace()); This should display a stack trace instead of a "Fatal Error" message. That should help you find the cause of the problem. Link to comment Share on other sites More sharing options...
kilrathi Posted October 20, 2010 Author Share Posted October 20, 2010 Hi...i did as you said, and now this is displayed in my screen after i login as CUSTOMER.Array( [0] => Array ( [file] => /home/arvee/domains/arvee.com.my/public_html/prestashop/classes/Tax.php [line] => 186 [function] => displayError [class] => Tools [type] => :: [args] => Array ( ) ) [1] => Array ( [file] => /home/arvee/domains/arvee.com.my/public_html/prestashop/classes/Product.php [line] => 2238 [function] => getApplicableTax [class] => Tax [type] => :: [args] => Array ( [0] => 0 [1] => 0 ) ) [2] => Array ( [file] => /home/arvee/domains/arvee.com.my/public_html/prestashop/classes/Product.php [line] => 1209 [function] => getProductProperties [class] => Product [type] => :: [args] => Array ( [0] => 1 [1] => Array ( [id_product] => 88 [id_supplier] => 0 [id_manufacturer] => 0 [id_tax] => 0 [id_category_default] => 27 [id_color_default] => 0 [on_sale] => 1 [ean13] => [ecotax] => 0.00 [quantity] => 20 [price] => 240.000000 [wholesale_price] => 0.000000 [reduction_price] => 0.00 [reduction_percent] => 55 [reduction_from] => 2010-05-16 00:00:00 [reduction_to] => 2010-05-16 00:00:00 [reference] => [supplier_reference] => [location] => [weight] => 0 [out_of_stock] => 2 [quantity_discount] => 0 [customizable] => 0 [uploadable_files] => 0 [text_fields] => 0 [active] => 1 [indexed] => 1 [date_add] => 2010-05-16 07:03:00 [date_upd] => 2010-05-16 07:13:28 [description] => [description_short] => Collections of Milly & Molly's series [link_rewrite] => milly-molly-collections [meta_description] => [meta_keywords] => [meta_title] => [name] => Milly, Molly Collections [id_image] => 146 [legend] => Milly, Molly Collections [rate] => ) ) ) [3] => Array ( [file] => /home/arvee/domains/arvee.com.my/public_html/prestashop/modules/blockspecials/blockspecials.php [line] => 30 [function] => getRandomSpecial [class] => Product [type] => :: [args] => Array ( [0] => 1 ) ) [4] => Array ( [function] => hookRightColumn [class] => BlockSpecials [object] => BlockSpecials Object ( [_html:private] => [_postErrors:private] => Array ( ) [id] => 20 [version] => 0.8 [name] => blockspecials [displayName] => Specials block [description] => Adds a block with current product Specials [tab] => Blocks [active] => 1 [_lang:private] => Array ( ) [_path:protected] => /prestashop/modules/blockspecials/ [warning] => [beforeUninstall] => [_errors] => [table:protected] => module [identifier:protected] => id_module ) [type] => -> [args] => Array ( [0] => Array ( [cookie] => Cookie Object ( [_content:private] => Array ( [date_add] => 2010-10-20 11:03:14 [id_lang] => 1 [id_currency] => 4 [id_guest] => 725 [id_connections] => 872 [ajax_blockcart_display] => expanded [id_customer] => 2 [customer_lastname] => SANMUGAM [customer_firstname] => Ravivarma [logged] => 1 [passwd] => b03ec7949605179e32846fd663be6c25 => [email protected] [checksum] => 1962285463 ) [_ Link to comment Share on other sites More sharing options...
rocky Posted October 20, 2010 Share Posted October 20, 2010 It's the following code that is producing the error: $state = new State(intval($address_ids['id_state'])); if (!Validate::isLoadedObject($state)) die(Tools::displayError()); For some reason, the value of id_state is not a valid state. I know that PrestaShop's state code was changed in v1.3.2. Did you upgrade the files in your theme? Link to comment Share on other sites More sharing options...
kilrathi Posted October 20, 2010 Author Share Posted October 20, 2010 I was using the original theme by prestashop in the last version ..and when i upgraded, i just copy pasted all the files from my OLD THEME folder to the NEW THEME folder ... Link to comment Share on other sites More sharing options...
rocky Posted October 20, 2010 Share Posted October 20, 2010 That could explain why it isn't working. Try switching to the default PrestaShop v1.3.2 theme and see if you still have the problem. Link to comment Share on other sites More sharing options...
espresso Posted October 20, 2010 Share Posted October 20, 2010 This is same case (with @kilrathi) & my presta.I get "Fatal Error" when Customer loginBut no error when customer logout.I use Presta 1.3.2 with original theme..thanks in advance.. Link to comment Share on other sites More sharing options...
kilrathi Posted October 20, 2010 Author Share Posted October 20, 2010 That could explain why it isn't working. Try switching to the default PrestaShop v1.3.2 theme and see if you still have the problem. I tried switching to default theme... and same problem .. Link to comment Share on other sites More sharing options...
rocky Posted October 20, 2010 Share Posted October 20, 2010 That's odd. I don't know why you are getting invalid states. It works on my site. Can you provide a link to your site so I can check your authentication page? Link to comment Share on other sites More sharing options...
kilrathi Posted October 20, 2010 Author Share Posted October 20, 2010 That's odd. I don't know why you are getting invalid states. It works on my site. Can you provide a link to your site so I can check your authentication page? arvee.com.my if you browse as guest, no problem.when you login as customer... then problem.. Link to comment Share on other sites More sharing options...
rocky Posted October 20, 2010 Share Posted October 20, 2010 I noticed that no states are displayed when I select USA. Did you disable states? Perhaps you have "Contains states" set to "Yes" on a country, but have disabled the states for the country? That might be why it is trying to load a state and isn't finding it. Link to comment Share on other sites More sharing options...
kilrathi Posted October 20, 2010 Author Share Posted October 20, 2010 i have removed ALL states.and in all countries, i've put "contains states" to NO. Link to comment Share on other sites More sharing options...
kilrathi Posted October 20, 2010 Author Share Posted October 20, 2010 in admin panel, when i go to Customers and click on CART ...i have all the array error messages..Also, when i click on next page in this CART .. it appears this message : > Invalid security token Link to comment Share on other sites More sharing options...
rocky Posted October 20, 2010 Share Posted October 20, 2010 Perhaps removing the states wasn't a good idea. It seems this query is returning a state, even though you've removed them all: SELECT `id_country`, `id_state` FROM `'._DB_PREFIX_.'address` WHERE `id_address` = '.intval($id_address)); Perhaps you have an address in your database with a state from before you removed the states. I suggest that you make sure that every address in the ps_address table of your database has an id_state of 0. Link to comment Share on other sites More sharing options...
kilrathi Posted October 20, 2010 Author Share Posted October 20, 2010 Perhaps removing the states wasn't a good idea. It seems this query is returning a state, even though you've removed them all: SELECT `id_country`, `id_state` FROM `'._DB_PREFIX_.'address` WHERE `id_address` = '.intval($id_address)); Perhaps you have an address in your database with a state from before you removed the states. I suggest that you make sure that every address in the ps_address table of your database has an id_state of 0. You were RIGHT! I changed the existing user state ID = 0 and it all worked well ... )So now, supposing I would like to turn state on for a country, do i need to ensure that the users have state too ?? Link to comment Share on other sites More sharing options...
rocky Posted October 20, 2010 Share Posted October 20, 2010 Yes, PrestaShop requires a state to be selected when "Contains states" is set to "Yes", so it may cause another Fatal Error if the id_state is 0 after you add states. Link to comment Share on other sites More sharing options...
kilrathi Posted October 20, 2010 Author Share Posted October 20, 2010 Thank you very much ..you have solved my headache! RIGHT ON THE DOT! Link to comment Share on other sites More sharing options...
madmike Posted November 12, 2010 Share Posted November 12, 2010 Thanks rocky,I was searching this for a wile.Mike Link to comment Share on other sites More sharing options...
conniedesign Posted February 7, 2011 Share Posted February 7, 2011 Hi Rocky,After I have deleted the States that I created in phpmyadmin. I have this word 'Fatal error' displayed on my Back Office and my website displayed on home page too, I’m panicking now. I have deleted the some of the ps_states/ps_zone/ps_country in phpmyadmin, because I couldn’t find the States that I created at the Back Office. So I went to delete and edit from phpmyadmin. Now I have this word Fatal Error. Do you know what causes this word Fatal Error. Please help! I need some of your advice. I have attached a screen shot for you.Thanks heaps! Link to comment Share on other sites More sharing options...
conniedesign Posted February 7, 2011 Share Posted February 7, 2011 I hope you will respone my post, rocky. Thank you in advance Link to comment Share on other sites More sharing options...
rocky Posted February 7, 2011 Share Posted February 7, 2011 Edit classes/Tools.php and uncomment the debug_backtrace line in the displayError function to get a stack trace instead of just "Fatal Error". That should give you more information that will help you trace the problem. Link to comment Share on other sites More sharing options...
www.bio-krby-kamna.cz Posted June 30, 2012 Share Posted June 30, 2012 (edited) Hi Rocky. I have same problem: Fatal error after customer login. Please help! Listing debug_backtrace in attachment. Edited July 6, 2012 by www.bio-krby-kamna.cz (see edit history) Link to comment Share on other sites More sharing options...
www.bio-krby-kamna.cz Posted July 6, 2012 Share Posted July 6, 2012 SOLVED. When i use prestashop 1.0.0.8. In database i have ID for my country -16. After upgrade to 1.3.7. instalation add same country with ID - 83. After delete country with id 16 customers with early registration after login got Fatal error. I must restore in DB country with ID 16 . Its all. Link to comment Share on other sites More sharing options...
Recommended Posts