Jump to content

[SOLVED] Fatal error: Cannot access empty property, FrontController.php, PS_TAX_ADDRESS_TYPE


Recommended Posts

Hi

 

My host was troubling me over excess usage of resources & complex mysql queries when they said they will enable cache, which led to my site breaking and redirecting to a particular product only irrespective of which product we clicked. So I asked them to disable cache & then my site went down with this error:

 

Fatal error: Cannot access empty property in /classes/FrontController.php on line 243

 

which is

 

if ($cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')})

 

I checked my database for PS_TAX_ADDRESS_TYPE, and it doesn't even exist.

 

I really don't know what's going on, can anyone here please help.

 

Thanks

Link to comment
Share on other sites

  • 2 months later...

Hi Nem, please elaborate where to find the table and rename it. I have the exact same issue same error same line as well. I migrated PS to a new host and I am getting this error. Obviously it is looking for PS_ configuration and not finding it but Im confused what went wrong. Where do I go to rename?

Hello,

 

'PS_TAX_ADDRESS_TYPE' dosn't exist so you have this error. You have to reinstall PrestaShop.

Please check the 'ps_configuration' table. If you didn't see any table prefix 'PS_XX_XXXX' that mean you have to renname them.

 

Regards,

Chris

Link to comment
Share on other sites

in phpmyadmin, in the table ps_configuration, insert this row (if you dont have)

 

id_configuration leave blank

name PS_TAX_ADDRESS_TYPE

value id_address_delivery

date_add 2012-05-14 19:59:11

date_upd 2012-05-14 19:59:11

 

 

and insert

  • Like 1
Link to comment
Share on other sites

Wow that's great! I added the row and a multitude of error came up but that one disappeared. Although what I did was follow the pathways and discovered each was a denial permission and all in the smarty folder. Don't know why this happened from one host to the next.

 

What I did was ftp into the folder and change the permission reclusively.

 

NOW THE HOME PAGE COMES UP!!!

 

Thank you!!!

 

 

 

 

I have one more small problem and it has to do with that MySql again.

 

Im getting this error when I log into the back end.

Fatal error (Employee -> id_lang is empty)

 

Do you have a simple fix for this? Can I just export ps_employee from the old host and import this to the new host in the phpMySql to fix this?

 

and thanks for helping Benjamin. I know you're watching this thread lol

 

in phpmyadmin, in the table ps_configuration, insert this row (if you dont have) id_configuration leave blank name PS_TAX_ADDRESS_TYPE value id_address_delivery date_add 2012-05-14 19:59:11 date_upd 2012-05-14 19:59:11 and insert
Link to comment
Share on other sites

Thanks got me back there! This is interesting. We keep knocking out one issue after another but I keep running into something else.

 

No tabs are showing up in the panel. Shows "Tab cannot be found".

 

edit in phpmyadmin the employee table, edit your user and set the id_land field (1 for english). If dont have this field, select to add a new field with this data name: id_lang type: int(10) null: no default: 0

post-382980-0-44909100-1345832368_thumb.jpg

Link to comment
Share on other sites

Hi Benjamin,

 

Thank you for great support. I noticed all php files for the tabs are in the tabs folder.

Hello Gary,

 

This Tab error seems that you do not have all the necessary files. My recommendation would be to download a fresh install of the latest version and compare which files you are missing in your shop.

Link to comment
Share on other sites

Do you think if I make a dump file of the old MySql from the phpMyAdmin and upload it to the new host this will resolve all the MySql issues? I copied over almost an entire new site and the tabs do no show up nor most of the home page. Only the header and a logo. Look forward to your reply.

Link to comment
Share on other sites

Dear Gary,

 

Hello, I think that it may solve your problems. However, it may also offer the same problem. Their could be some tables or files missing in your Database. However, as always, it is worth a try to see if it solves your problem. Comparing a new install database with yours along with the files of a new install and your files and folders is a good, albeit lengthy, process. Thank you for choosing PrestaShop!

Link to comment
Share on other sites

If you wish to use prestashop 1.4.9.0, then you need to correct two errors in the file /classes/FrontController.php

 

Replace line#320

 

if (Tools::isSubmit('live_edit') && $ad = Tools::getValue('ad') && Tools::getValue('liveToken') == sha1(Tools::getValue('ad')._COOKIE_KEY_))

 

to this

 

if (Tools::isSubmit('live_edit') && ($ad = Tools::getValue('ad')) && Tools::getValue('liveToken') == sha1(Tools::getValue('ad')._COOKIE_KEY_))

 

Replace line#532

 

if (Tools::isSubmit('live_edit') && $ad = Tools::getValue('ad') && Tools::getValue('liveToken') == sha1(Tools::getValue('ad')._COOKIE_KEY_))

 

to this

 

if (Tools::isSubmit('live_edit') && ($ad = Tools::getValue('ad')) && Tools::getValue('liveToken') == sha1(Tools::getValue('ad')._COOKIE_KEY_))

  • Like 1
Link to comment
Share on other sites

If you wish to use prestashop 1.4.9.0, then you need to correct two errors in the file /classes/FrontController.php

 

Replace line#320

 

if (Tools::isSubmit('live_edit') && $ad = Tools::getValue('ad') && Tools::getValue('liveToken') == sha1(Tools::getValue('ad')._COOKIE_KEY_))

 

to this

 

if (Tools::isSubmit('live_edit') && ($ad = Tools::getValue('ad')) && Tools::getValue('liveToken') == sha1(Tools::getValue('ad')._COOKIE_KEY_))

 

Replace line#532

 

if (Tools::isSubmit('live_edit') && $ad = Tools::getValue('ad') && Tools::getValue('liveToken') == sha1(Tools::getValue('ad')._COOKIE_KEY_))

 

to this

 

if (Tools::isSubmit('live_edit') && ($ad = Tools::getValue('ad')) && Tools::getValue('liveToken') == sha1(Tools::getValue('ad')._COOKIE_KEY_))

Qorks fine.

Thanks

Link to comment
Share on other sites

  • 2 months later...

in phpmyadmin, in the table ps_configuration, insert this row (if you dont have)

 

id_configuration leave blank

name PS_TAX_ADDRESS_TYPE

value id_address_delivery

date_add 2012-05-14 19:59:11

date_upd 2012-05-14 19:59:11

 

 

and insert

 

I got the same problem but I can not find the ps_configuration in phpmyadmin, it doesn't exist. please help me if you have alternative solution or help me to create the ps_configuration.

 

Many thanks

Link to comment
Share on other sites

  • 10 months later...

Hi

 

Sorry to bump this old thread. I recently upgraded from 1.4.11 to 1.5.5 and had this error and i solved it by inserting the tax_address_type value. But now i have a a new error as follows :

 

 Undefined variable: (/var/www/testshop/classes/SpecificPrice.php, line 172)

 

Which is :

 

 foreach (array_reverse($priority) as $k => $field)
                        $select .= ' IF (`'.bqSQL($field).'` =  '.(int)$$field.', '.pow(2, $k + 1).', 0) + ';
 

Edited by indus (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...