Jump to content

Fatal Error Upon Customer Login


Recommended Posts

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

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

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

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

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

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

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

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

  • 4 weeks later...
  • 2 months later...

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!

38091_6G4o3t2RbLUhvu65WKD7_t

Link to comment
Share on other sites

  • 1 year later...
×
×
  • Create New...