pietpetoors Posted May 15 Share Posted May 15 I tried 1-Click but it failed. I then did a manual update , loaded the files of 8.1.6 as per instructions for manual update. Previous version was 1.7.8.1 and this is at https://www.4x4direct.co.za I now get blank screen on the web site and on the admin section. From instructions I could not figure out how to do the DB update part, I have no idea how to access command line on the Plesk server and if I just go to modules/autoupgrade/cli-upgrade.php it says I must do it in CLi. I think my blank screen might be because I have not updated DB yet. "Upgrading the database is a step of the process ran by the upgrade module. It can be independantly triggered from the command line even if the module is uninstalled: php modules/autoupgrade/cli-upgrade.php --dir=<path_to_the_admin_folder> --channel=private --action=upgradeDb This is in the error log: 16766#0: *22018971 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Class "CartCore" not found in /var/www/vhosts/4x4direct.co.za/httpdocs/override/classes/Cart.php:15 Stack trace: #0 /var/www/vhosts/4x4direct.co.za/httpdocs/vendor/prestashop/autoload/src/Autoloader.php(103): require_once() #1 /var/www/vhosts/4x4direct.co.za/httpdocs/classes/controller/FrontController.php(467): PrestaShop\Autoload\Autoloader->load() #2 /var/www/vhosts/4x4direct.co.za/httpdocs/controllers/front/ProductController.php(124): FrontControllerCore->init() #3 /var/www/vhosts/4x4direct.co.za/httpdocs/classes/controller/Controller.php(300): ProductControllerCore->init() #4 /var/www/vhosts/4x4direct.co.za/httpdocs/classes/Dispatcher.php(510): ControllerCore->run() #5 /var/www/vhosts/4x4direct.co.za/httpdocs/index.php(28): DispatcherCore->dispatch() #6 {main} thrown in /var/www/vhosts/4x4direct.co.za/httpdocs/override/classes/Cart.php on line 15" while reading response header from upstream Link to comment Share on other sites More sharing options...
pietpetoors Posted May 15 Author Share Posted May 15 The server guys tried to help me but this was the result, the script for updating DB did not work properly I've ran the specified command but it ended with database structure error: Last login: Wed May 15 06:50:19 2024 -bash-4.2$ cd httpdocs -bash-4.2$ php modules/autoupgrade/cli-upgrade.php --dir=admin147frxzs2 --channel=private --action=upgradeDb INFO - === Step upgradeDb INFO - Cleaning file cache INFO - Running opcache_reset INFO - Initializing required environment constants PHP Warning: file_exists(): open_basedir restriction in effect. File(/autoload.php) is not within the allowed path(s): (/var/www/vhosts/4x4direct.co.za/:/tmp/) in /var/www/vhosts/4x4direct.co.za/httpdocs/modules/autoupgrade/classes/UpgradeTools/CoreUpgrader/CoreUpgrader.php on line 224 INFO - Checking version validity INFO - Checking connection to database INFO - Disabling all non native modules INFO - Updating database data and structure PrestaShopException^ {#16694 #message: "SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'route_name'" #code: 42 #file: "/var/www/vhosts/4x4direct.co.za/httpdocs/classes/db/DbPDO.php" #line: 151 -previous: PDOException {#17141 #message: "SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'route_name'" #code: "42S21" #file: "/var/www/vhosts/4x4direct.co.za/httpdocs/classes/db/DbPDO.php" #line: 149 +errorInfo: array:3 [ 0 => "42S21" 1 => 1060 2 => "Duplicate column name 'route_name'" ] trace: { /var/www/vhosts/4x4direct.co.za/httpdocs/classes/db/DbPDO.php:149 { DbPDOCore->_query($sql)^ › try { › return $this->link->query($sql); › } catch (\PDOException $exception) { } /var/www/vhosts/4x4direct.co.za/httpdocs/classes/db/Db.php:377 { …} /var/www/vhosts/4x4direct.co.za/httpdocs/classes/db/Db.php:567 { …} ./modules/autoupgrade/classes/UpgradeTools/CoreUpgrader/CoreUpgrader.php:435 { …} ./modules/autoupgrade/classes/UpgradeTools/CoreUpgrader/CoreUpgrader.php:366 { …} ./modules/autoupgrade/classes/UpgradeTools/CoreUpgrader/CoreUpgrader.php:288 { …} ./modules/autoupgrade/classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php:66 { …} ./modules/autoupgrade/classes/UpgradeTools/CoreUpgrader/CoreUpgrader.php:110 { …} ./modules/autoupgrade/classes/UpgradeTools/CoreUpgrader/CoreUpgrader81.php:46 { …} ./modules/autoupgrade/classes/TaskRunner/Upgrade/UpgradeDb.php:41 { …} ./modules/autoupgrade/classes/TaskRunner/ChainedTasks.php:52 { …} ./modules/autoupgrade/cli-upgrade.php:39 { …} } } trace: { /var/www/vhosts/4x4direct.co.za/httpdocs/classes/db/DbPDO.php:151 { DbPDOCore->_query($sql)^ › } catch (\PDOException $exception) { › throw new PrestaShopException($exception->getMessage(), (int) $exception->getCode(), $exception); › } } /var/www/vhosts/4x4direct.co.za/httpdocs/classes/db/Db.php:377 { …} /var/www/vhosts/4x4direct.co.za/httpdocs/classes/db/Db.php:567 { …} ./modules/autoupgrade/classes/UpgradeTools/CoreUpgrader/CoreUpgrader.php:435 { …} ./modules/autoupgrade/classes/UpgradeTools/CoreUpgrader/CoreUpgrader.php:366 { …} ./modules/autoupgrade/classes/UpgradeTools/CoreUpgrader/CoreUpgrader.php:288 { …} ./modules/autoupgrade/classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php:66 { …} ./modules/autoupgrade/classes/UpgradeTools/CoreUpgrader/CoreUpgrader.php:110 { …} ./modules/autoupgrade/classes/UpgradeTools/CoreUpgrader/CoreUpgrader81.php:46 { …} ./modules/autoupgrade/classes/TaskRunner/Upgrade/UpgradeDb.php:41 { …} ./modules/autoupgrade/classes/TaskRunner/ChainedTasks.php:52 { …} ./modules/autoupgrade/cli-upgrade.php:39 { …} } } -bash-4.2$ Link to comment Share on other sites More sharing options...
Paul C Posted May 15 Share Posted May 15 You should probably disable your overrides (temporarily rename the directory is fine and then clear the cache to remove reference to them. You can do that now after the fact by just removing the dev and prod subdirectories in var/cache). Most update errors come from 3rd party modules (or even sometimes home grown ones). Unless you're 100% confident all the modules are compatible with the new version, then it's better to uninstall (or maybe just disable) them. There's likely an issue with autoloading which is why it can't find CartCore in your override. Cleaning the cache may help with that also. Link to comment Share on other sites More sharing options...
pietpetoors Posted May 15 Author Share Posted May 15 Thank you Paul. This morning I restored my backup so I am back on 1.7.8.7 . When I attempt another upgrade I will follow your advice and disable modules first before I do update. Cache has not been enabled in Presta for a long time now. But next time I will clear whatever cache I can find. Will probably do another attempt over the weekend when the shop is quiet. Link to comment Share on other sites More sharing options...
Paul C Posted May 15 Share Posted May 15 (edited) 39 minutes ago, pietpetoors said: Thank you Paul. This morning I restored my backup so I am back on 1.7.8.7 . When I attempt another upgrade I will follow your advice and disable modules first before I do update. Cache has not been enabled in Presta for a long time now. But next time I will clear whatever cache I can find. Will probably do another attempt over the weekend when the shop is quiet. Even if you have the "cache" option disabled there are still a lot of things PrestaShop caches - in particular items related to symphony, autoloading etc. well worth clicking that button if you make changes such as disabling overrides Been caught out to many times so now it's become an automatic reflex.... Edited May 15 by Paul C fixed typo (see edit history) 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