Jump to content

Failing Upgrade from 1.6.1.24 to 1.7.6.8


igyorgyi

Recommended Posts

I am trying to upgrade from PrestaShop 1.6.1.24 to the latest version (1.7.6.8) on a local windows instance of a live environment. 

By changing the 1-ClickUpgrade to check for minor version I have upgraded successfully to latest 1.6 version using PHP 5.4.

Since then I tried PHP 5.4, 7.4 and 7.1 too, all failed while upgrading before starting the database upgrade. Here's the last error from Apache Error Log:

[Sun Nov 15 20:51:29.849614 2020] [php7:error] [pid 2832:tid 1876] [client 127.0.0.1:52688] PHP Fatal error:  require(): Failed opening required 'C:\\xampp\\htdocs\\site\\vendor\\composer/../symfony/polyfill-ctype/bootstrap.php' (include_path='C:\\xampp\\htdocs\\site\\vendor/pear/pear_exception;C:\\xampp\\htdocs\\site\\vendor/pear/console_getopt;C:\\xampp\\htdocs\\site\\vendor/pear/pear-core-minimal/src;C:\\xampp\\htdocs\\site\\vendor/pear/archive_tar;\\xampp\\php\\PEAR') in C:\\xampp\\htdocs\\site\\vendor\\composer\\autoload_real.php on line 64

Line 64 of autoload_real.php:

61:function composerRequire77e84d43f3485fdd446ce974b4de5b5d($fileIdentifier, $file)
62:{
63:    if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
64:        require $file;

65:

66:        $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
67:    }
68:}
 

Activity Log:

189 files left to upgrade.
All files upgraded. Now upgrading database...
[Ajax / Server Error for action upgradeDb] textStatus: "error " errorThrown:"Internal Server Error " jqXHR: "
500 Server Error
Oops, something went wrong.

Try to refresh this page or feel free to contact us if the problem persists.

====

Copied \vendor\twig\twig\src\TwigTest.php.
Directory \vendor\twig\twig\src\Util created.
Copied \vendor\twig\twig\src\Util\DeprecationCollector.php.
Copied \vendor\twig\twig\src\Util\TemplateDirIterator.php.
Directory \webservice already exists.
Copied \webservice\dispatcher.php.
Copied \webservice\index.php.

====

What I noticed in Symphony files:

SymfonyRequirements.php
<?php
/**
 * Note: This file has been modified for PHP 7.2 compatibility.
 * See:
 * - https://github.com/PrestaShop/PrestaShop/pull/9409
 * - https://github.com/sensiolabs/SensioDistributionBundle/pull/336
 */

Do I need to go with PHP 7.2?

 

Any idea why is this happen? I have tried it many times, clearing the cache, updating modules, disabling non-native mods, and overrrides. Still the same.

Please give me an advice!

Thanks in advance!

Link to comment
Share on other sites

I'm not sure if this will help with your windows version, but PS 1.7x has a problem installing in IIS 10. This has been fixed in PS 1.7.7.0 RC1

The work around for previous versions <1.7.6.9  is to remove the modern directory from \mails\themes\modern

If you want to try this for windows version, you will need to download a copy of PS 1.7.6.9, this version has a new security update. put the file in your admin autoupgrade folder and change your one click upgrade to point to the local file. Make sure you are using the latest version of one click upgrade.
https://www.prestashop.com/en/download

If this dosen't work, try installing fresh version of PS 1.7.6.9 and PS 1.7.7.0 RC and see if you have a problem with them without the upgrade, that would let us know if the problem is with your current version. 

Link to comment
Share on other sites

Not directly Related to your topic but i would suggest you to wait a year for getting more stable version of PS 1.7. It is more stable now but there are still a lot of bugs there that are super annoying and needed to be fixed. Wait until then. I understand that you are probably just exploring the possibilities but that was a suggestion if you want to try that on your original online store. 

  • Like 2
Link to comment
Share on other sites

I'm still using PS 1.5.6.3 

PS1.6x started off a little rough so I stayed with what worked. But now I'm stuck with PHP 5.6 and the speed improvements of PHP 7x, and the new faster queries and theme structure of PS 1.7 have now tip the scales.

But I'm finally going to upgrade to PS 1.7.7.0 when released. I should perhaps wait a year, but is so much work to get a shop 100% that I can't see investing in PS 1.6x and then again a year from now do it all again with PS 1.8x if that is where this moving target will be. At lease with v1.7.7.x I'll have my pick of modules, faster code and better themes.

Link to comment
Share on other sites

12 hours ago, Bill Dalton said:

I'm not sure if this will help with your windows version, but PS 1.7x has a problem installing in IIS 10. This has been fixed in PS 1.7.7.0 RC1

Thanks for the reply. I am using XAMPP, with Apache on Windows, I hate IIS. Of course in my test environment. In production there's linux with Apache.

I will try the upgrade with the local copy, you have mentioned, but I have no themes under mails folder, only two folders for languages. (en, hu)

 

Meanwhile I have created a test version, next to the production one on the same environment. It is PHP 5.4

Server information Linux #1 SMP Fri Jan 4 06:55:54 EST 2019 x86_64

Server software version Apache

PHP version 5.4.45

Memory limit 128M

MySQL version 10.2.33-MariaDB-log-cll-lve

Similar failure happend there also. Even the database backup step failed. Then I tried it without backup (rollback option). After file upgrades the DB updates crashed again. Only internal server error came from the site. So, this is not WIndows related for sure.

My plan is to try update in minor steps, from 1.6 to the first 1.7 release stable instead of the lates one. 

Link to comment
Share on other sites

8 hours ago, num47 said:

I understand that you are probably just exploring the possibilities but that was a suggestion if you want to try that on your original online store. 

Actually, I wanted to made the site up-to-date. But 1.7 version does not look promising. I found tons of topics about failing updates. This was the most interesting:

It's easier to migrate PS to a different product then to it's latest version. That sounds terrifying!

Link to comment
Share on other sites

I usually test each version as they are released. I found two problems each time. 

1. would not install properly on a Windows based computer. It seemed related to twig files and a work around was to remove the Modern directory from mail/themes before beginning install.

2. PrestaShop multi-store had a lot of problems.

With the current RC version PS 1.7.7.0 I see something that with some professional help I may try to "give it a go". Prestashop has always been far from perfect or even stable.

I do like the current people involved on the project. The team that began PS 1.7 is gone, there is a new team and they have a plan. I think going forward we'll benefit from that. A proper plan is what has been lacking in the past.

Link to comment
Share on other sites

On 11/17/2020 at 11:38 AM, Bill Dalton said:

I'm still using PS 1.5.6.3 

PS1.6x started off a little rough so I stayed with what worked. But now I'm stuck with PHP 5.6 and the speed improvements of PHP 7x, and the new faster queries and theme structure of PS 1.7 have now tip the scales.

But I'm finally going to upgrade to PS 1.7.7.0 when released. I should perhaps wait a year, but is so much work to get a shop 100% that I can't see investing in PS 1.6x and then again a year from now do it all again with PS 1.8x if that is where this moving target will be. At lease with v1.7.7.x I'll have my pick of modules, faster code and better themes.

Up to you bro. I have found out several problems that potentially can destroy your back office anytime. One of the cumbersome problem i have faced is that trying to uninstall a module. It sometimes crashes the whole back office and i could not find any way to solve it without reinstalling the whole system! This sucks, in my opinion. 

Link to comment
Share on other sites

6 minutes ago, igyorgyi said:

Tried manual instal of 1.7.0.0 same error:

Now backing up database

Database backup: 165 table(s) left...

[Ajax / Server Error for action backupDb] textStatus: "error " errorThrown:" " jqXHR: "

:(

Guys, you still don't get it?
Prestashop 1.6 works on PHP 5.6, Prestashop 1.7 also works on PHP 5.6.
So where is the problem now?
The problem is that there are differences in the database tables, some are extra, some are missing, and some have different columns.
Modules from Prestashop 1.6 are not compatible with Prestashop 1.7 etc. etc.
Upgrading from Prestashop 1.6 to 1.7 is not possible without problems caused by third-party modules, third-party appearance templates ....
If you have a large amount of data stored in the database, there will be an error ....

Only an expert and a very good programmer can upgrade from Prestashop 1.6 to Prestashop 1.7.
Upgrade modules are never 100% functional, do not take override into account, etc.

Link to comment
Share on other sites

You can be right, but I have switched of all 3rd party modules, btw we don't have any - I think.

Your compatibility chart shows that PHP 5.4 is supported by both versions, ok it's not recommended.

I tried it again. 

This time local archive again, without backing up files, database update fails again, but with more detailed error messages:

Quote

 

109 files left to upgrade.All files upgraded. Now upgrading database...[Ajax / Server Error for action upgradeDb] textStatus: "error " errorThrown:" " jqXHR: "

[PrestaShopException]

[ThemeRepository] Theme configuration file not found for theme `classic`.
at line 134 in file src/Core/Addon/Theme/ThemeRepository.php

129. } 130. 131. private function getConfigFromFile($file, $name) 132. { 133. if (!$this->filesystem->exists($file)) { 134. throw new \PrestaShopException(sprintf('[ThemeRepository] Theme configuration file not found for theme `%s`.', $name)); 135. } 136. 137. $content = file_get_contents($file); 138. 139. if (preg_match('/.\.(yml|yaml)$/', $file)) {

PrestaShop\PrestaShop\Core\Addon\Theme\ThemeRepository->getConfigFromFile - [line 70 - src/Core/Addon/Theme/ThemeRepository.php] - [2 Arguments]

PrestaShop\PrestaShop\Core\Addon\Theme\ThemeRepository->getInstanceByName - [line 494 - classes/shop/Shop.php] - [1 Arguments]

ShopCore->setTheme - [line 142 - classes/shop/Shop.php]

ShopCore->__construct - [line 414 - classes/shop/Shop.php] - [1 Arguments]

ShopCore::initialize - [line 113 - config/config.inc.php]

require_once - [line 550 - modules/autoupgrade/classes/UpgradeContainer.php] - [1 Arguments]

PrestaShop\Module\AutoUpgrade\UpgradeContainer->initPrestaShopCore - [line 120 - modules/autoupgrade/classes/TaskRunner/AbstractTask.php]

PrestaShop\Module\AutoUpgrade\TaskRunner\AbstractTask->init - [line 75 - modules/autoupgrade/classes/TaskRunner/Upgrade/UpgradeDb.php]

PrestaShop\Module\AutoUpgrade\TaskRunner\Upgrade\UpgradeDb->init - [line 52 - admin/autoupgrade/ajax-upgradetab.php]

"

 

Theme update was also switched off.

About myself. I was a web developer for more then 15 years, but I am not working in this business for over 5 years now.

The shop I am trying to upgrade is a friend of mine. I just wanted to update it to the latest stable version.

It looks, that it will be 1.6.1.24.

Link to comment
Share on other sites

Same errors:

Quote

 

All files upgraded. Now upgrading database...[Ajax / Server Error for action upgradeDb] textStatus: "error " errorThrown:" " jqXHR: "

[PrestaShopException]

[ThemeRepository] Theme configuration file not found for theme `classic`.
at line 134 in file src/Core/Addon/Theme/ThemeRepository.php

129. } 130. 131. private function getConfigFromFile($file, $name) 132. { 133. if (!$this->filesystem->exists($file)) { 134. throw new \PrestaShopException(sprintf('[ThemeRepository] Theme configuration file not found for theme `%s`.', $name)); 135. } 136. 137. $content = file_get_contents($file); 138. 139. if (preg_match('/.\.(yml|yaml)$/', $file)) {

PrestaShop\PrestaShop\Core\Addon\Theme\ThemeRepository->getConfigFromFile - [line 70 - src/Core/Addon/Theme/ThemeRepository.php] - [2 Arguments]

PrestaShop\PrestaShop\Core\Addon\Theme\ThemeRepository->getInstanceByName - [line 494 - classes/shop/Shop.php] - [1 Arguments]

ShopCore->setTheme - [line 142 - classes/shop/Shop.php]

ShopCore->__construct - [line 414 - classes/shop/Shop.php] - [1 Arguments]

ShopCore::initialize - [line 113 - config/config.inc.php]

require_once - [line 550 - modules/autoupgrade/classes/UpgradeContainer.php] - [1 Arguments]

PrestaShop\Module\AutoUpgrade\UpgradeContainer->initPrestaShopCore - [line 120 - modules/autoupgrade/classes/TaskRunner/AbstractTask.php]

PrestaShop\Module\AutoUpgrade\TaskRunner\AbstractTask->init - [line 75 - modules/autoupgrade/classes/TaskRunner/Upgrade/UpgradeDb.php]

PrestaShop\Module\AutoUpgrade\TaskRunner\Upgrade\UpgradeDb->init - [line 52 - admin/autoupgrade/ajax-upgradetab.php]

 

image.thumb.png.68a1c008b7692b78f7f80332fb067869.png

Giving up. Thanks all for your help!

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...