Jump to content

Getting error after 1.6 upgrade


Recommended Posts

I upgraded to 1.6 and after five minutes or so clicking through front/back office to check if everything was fine - I get this message:

 

 

Notice: Use of undefined constant _PS_CONFIG_DIR_ - assumed '_PS_CONFIG_DIR_' in /storage/content/21/104221/website.se/public_html/config/config.inc.php on line 53 Warning: require_once(_PS_CONFIG_DIR_autoload.php): failed to open stream: No such file or directory in /storage/content/21/104221/website.se/public_html/config/config.inc.php on line 53 Fatal error: require_once(): Failed opening required '_PS_CONFIG_DIR_autoload.php' (include_path='.:/usr/share/php:/usr/share/pear') in /storage/content/21/104221/website.se/public_html/config/config.inc.php on line 53

Link to comment
Share on other sites

I've checked the FTP for the file in the config-directory, and it's present. So I don't understand why it gives off this error. :/

In the config.inc.php it tries to call it by this line:

 

require_once(_PS_CONFIG_DIR_.'autoload.php');

 

Is there something wrong with it?

 

 

As of now I can't access neither front or back-office. :P

 

 

Edit:

 

I think I just figured it out, I removed the _PS_CONFIG_DIR_. from it, as the config is in the config dir it doesn't need a dir I think... When I removed it a new error came up instead, and so I did the same for that. Now there's another big error instead that mentiones something else.

 

Will take a look at it.

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

This one I don't know what to do with though:

 

The code says:

require_once(_PS_CLASS_DIR_.'PrestaShopAutoload.php');

 

 

And the error I get is:

 

Notice: Use of undefined constant _PS_CORE_DIR_ - assumed '_PS_CORE_DIR_' in /storage/content/21/104221/website.se/public_html/classes/PrestaShopAutoload.php on line 63 Warning: scandir(_PS_CORE_DIR_/classes/): failed to open dir: No such file or directory in /storage/content/21/104221/website.se/public_html/classes/PrestaShopAutoload.php on line 170 Warning: scandir(): (errno 2): No such file or directory in /storage/content/21/104221/website.se/public_html/classes/PrestaShopAutoload.php on line 170 Warning: Invalid argument supplied for foreach() in /storage/content/21/104221/website.se/public_html/classes/PrestaShopAutoload.php on line 170 Warning: scandir(_PS_CORE_DIR_/controllers/): failed to open dir: No such file or directory in /storage/content/21/104221/website.se/public_html/classes/PrestaShopAutoload.php on line 170 Warning: scandir(): (errno 2): No such file or directory in /storage/content/21/104221/website.se/public_html/classes/PrestaShopAutoload.php on line 170 Warning: Invalid argument supplied for foreach() in /storage/content/21/104221/website.se/public_html/classes/PrestaShopAutoload.php on line 170 Warning: scandir(_PS_CORE_DIR_/override/classes/): failed to open dir: No such file or directory in /storage/content/21/104221/website.se/public_html/classes/PrestaShopAutoload.php on line 170 Warning: scandir(): (errno 2): No such file or directory in /storage/content/21/104221/website.se/public_html/classes/PrestaShopAutoload.php on line 170 Warning: Invalid argument supplied for foreach() in /storage/content/21/104221/website.se/public_html/classes/PrestaShopAutoload.php on line 170 Warning: scandir(_PS_CORE_DIR_/override/controllers/): failed to open dir: No such file or directory in /storage/content/21/104221/website.se/public_html/classes/PrestaShopAutoload.php on line 170 Warning: scandir(): (errno 2): No such file or directory in /storage/content/21/104221/website.se/public_html/classes/PrestaShopAutoload.php on line 170 Warning: Invalid argument supplied for foreach() in /storage/content/21/104221/website.se/public_html/classes/PrestaShopAutoload.php on line 170 Warning: rename(/tmp/class_index.php.Axf4dI,_PS_CORE_DIR_/cache/class_index.php): No such file or directory in /storage/content/21/104221/website.se/public_html/classes/PrestaShopAutoload.php on line 149 Fatal error: Class 'Tools' not found in /storage/content/21/104221/website.se/public_html/config/config.inc.php on line 64

 

 

 

Wow, there are so many errors after this upgrade I did. :( How come?

Link to comment
Share on other sites

Can you check that you have 

/* Directories */
if (!defined('_PS_ROOT_DIR_'))
{
	define('_PS_ROOT_DIR_', realpath($currentDir.'/..'));
	define('_PS_CORE_DIR_', _PS_ROOT_DIR_);
}
else
	define('_PS_CORE_DIR_', realpath($currentDir.'/..'));

in defines.inc.php, starting at line 54?

Link to comment
Share on other sites

Staring at line 56 I have:

 

/* Directories */
define('_PS_ROOT_DIR_', realpath($currentDir.'/..'));
define('_PS_CLASS_DIR_',            _PS_ROOT_DIR_.'/classes/');
define('_PS_CONTROLLER_DIR_',       _PS_ROOT_DIR_.'/controllers/');
define('_PS_FRONT_CONTROLLER_DIR_', _PS_ROOT_DIR_.'/controllers/front/');
define('_PS_ADMIN_CONTROLLER_DIR_', _PS_ROOT_DIR_.'/controllers/admin/');
Link to comment
Share on other sites

Hm, Something is definitely wrong. What was your previous prestashop version?

 

It should be

 

/* Directories */
if (!defined('_PS_ROOT_DIR_'))
{
define('_PS_ROOT_DIR_', realpath($currentDir.'/..'));
define('_PS_CORE_DIR_', _PS_ROOT_DIR_);
}
else
define('_PS_CORE_DIR_', realpath($currentDir.'/..'));
 
In the stable 1.6 release
Link to comment
Share on other sites

It was 1.5.6.2. I downloaded the 1.6.0.5 now and opened up a fresh defines, overwrote the one in the ftp with the new one. After that it all works, however I wonder if there's any other files that have gone wrong during the upgrade. Hopefully not, and if they have then I guess I'll notice somehow along the way.

 

Thank you so much for your help! :)

Link to comment
Share on other sites

The homepage works but if I click a product page this comes up:

 

Strict Standards: Declaration of FrontControllerCore::addCSS() should be compatible with ControllerCore::addCSS($css_uri, $css_media_type = 'all', $offset = NULL) in /storage/content/21/104221/website.se/public_html/override/controllers/FrontController.php on line 1154 Fatal error: Call to undefined method ProductController::useMobileTheme() in /storage/content/21/104221/website.se/public_html/controllers/front/ProductController.php on line 40

 

 

Maybe it's easier if I just backup products and the theme (, then re-install the whole thing into 1.6?

Link to comment
Share on other sites

  • 1 month later...

@Eduardo Vilar do you mean the mobile one? If so try uploading a fresh productcontroller.php from a new 1.6.0.6 package ;)

Nemo1, I really appreciate your response. 
 
It was not on mobile. 
 
But yesterday I solved the issue by replacing my defines.inc.php file, other native version 1.6.0.6, and now the problem is solved. 
 
 
In truth the problem was not with the defines.inc but with payment and shipping modules that have created other files in the override / classes folder, but could only identify these errors after replacing the file defines.inc 
 
Tks again!
  • Like 2
Link to comment
Share on other sites

×
×
  • Create New...