Jump to content

1-Click 1.6.1.24 to 1.7.7.0 PrestashopInstallerException errors


andyfick

Recommended Posts

Hi All,

I've been experimenting with the 1-Click update to move my store from 1.6.1.24 to the latest 1.7.

I've set up a local dev instance to work on, running PHP 7.1.33, MySQL 5.7.31, using 1-Click version 4.11.0.

I've uninstalled all non-native modules from the shop. I'm in the UK and the shop is in English only. The theme is default-bootstrap.

I get the following errors when performing the update (these appear in the 1-Click update Errors window):

[INTERNAL] C:\wamp64\www\afth\src\PrestaShopBundle\Install\LanguageList.php line 100 - Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to load class "PrestashopInstallerException" from the global namespace. Did you forget a "use" statement? #0
C:\wamp64\www\afth\admin2796\autoupgrade\latest\install\upgrade\php\migrate_tabs_17.php(57): PrestaShopBundle\Install\LanguageList->setLanguage('gb') #1
internal function]: migrate_tabs_17() #2 C:\wamp64\www\afth\modules\autoupgrade\classes\UpgradeTools\CoreUpgrader\CoreUpgrader.php(395): call_user_func_array('migrate_tabs_17', Array) #3
C:\wamp64\www\afth\modules\autoupgrade\classes\UpgradeTools\CoreUpgrader\CoreUpgrader.php(360): PrestaShop\Module\AutoUpgrade\UpgradeTools\CoreUpgrader\CoreUpgrader->runPhpQuery('1.7.0.0', '/* PHP:migrate_...') #4
C:\wamp64\www\afth\modules\autoupgrade\classes\UpgradeTools\CoreUpgrader\CoreUpgrader.php(284): PrestaShop\Module\AutoUpgrade\UpgradeTools\CoreUpgrader\CoreUpgrader->runQuery('1.7.0.0', '/* PHP:migrate_...') #5
C:\wamp64\www\afth\modules\autoupgrade\classes\UpgradeTools\CoreUpgrader\CoreUpgrader17.php(55): PrestaShop\Module\AutoUpgrade\UpgradeTools\CoreUpgrader\CoreUpgrader->upgradeDb('1.6.1.24') #6
C:\wamp64\www\afth\modules\autoupgrade\classes\UpgradeTools\CoreUpgrader\CoreUpgrader.php(101): PrestaShop\Module\AutoUpgrade\UpgradeTools\CoreUpgrader\CoreUpgrader17->upgradeDb('1.6.1.24') #7
C:\wamp64\www\afth\modules\autoupgrade\classes\TaskRunner\Upgrade\UpgradeDb.php(41): PrestaShop\Module\AutoUpgrade\UpgradeTools\CoreUpgrader\CoreUpgrader->doUpgrade() #8
C:\wamp64\www\afth\admin2796\autoupgrade\ajax-upgradetab.php(53): PrestaShop\Module\AutoUpgrade\TaskRunner\Upgrade\UpgradeDb->run() #9 {main}

As per other topics on this subject, the ps_currency_lang table doesn't exist.

Creating this table (copying from a clean install) resolves that error, but then I'm into another exception, and on it goes - it turns out a number of tables are missing.

I'm guessing that the upgrade process is borking before it has chance to create certain tables.

There's clearly something about my shop that's causing this, but from all the troubleshooting I've done so far I can't see what it is.

Any thoughts, pointers or guidance gratefully received!

Andrew

Link to comment
Share on other sites

Hi,

I've been doing a bit more on this.

Update to PHP7.3 makes no difference so far.

So, I create the ps_currency_lang table, and that removes that error.

On the Front office, the next error is:

Type error: Argument 1 passed to PrestaShop\PrestaShop\Core\Localization\CLDR\ComputingPrecision::getPrecision() must be of the type integer, null given, called in C:\wamp64\www\afth\classes\Context.php on line 467

On the back office, I couldn't login, and had to create  ps_employee_session and ps_customer_session tables, after which I got:

The slug ROLE_MOD_TAB__READ is invalid

I copied a new ps_authorization_role table over from a fresh install and overwrote the ps_access table (which was previously empty). I also overwrote the ps_tab table with a fresh copy as there was a lot missing from that.

I can now get into the back office, although the menus don't appear properly - each menu item starts with the word Admin (e.g. AdminCatalog).

Tried to go into the Products list and got another missing table, ps_admin_filter, so I added that.

Now I'm at exactly the same ComputingPrecision error that I get in the Front Office above.

I'm stuck!

Andrew

(post edited a few times)

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

Thanks Leo,

My dispatcher.php file already has the line shown as added in the link you sent (line 36). I'm on 1.7.7.0.

Here's what it looks like:

// Cart is needed for some requests
Context::getContext()->cart = new Cart();
Context::getContext()->container = ContainerBuilder::getContainer('webservice', _PS_MODE_DEV_);
Context::getContext()->currency = Context::getContext()->currency ?? new Currency(Configuration::get('PS_CURRENCY_DEFAULT'));

Andrew

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

Some progress, thanks Leo:

I just replaced the ps_currency table with one from a fresh install, and that's cleared the ComputingPrecision error.

I now get this on the front end:

Call to a member function isRegisteredInHook() on bool

in ganalytics.php line 451

 

  • Like 1
Link to comment
Share on other sites

OK, so I removed that module, and also blockwishlist, which was throwing an error.

Front office loads with my logo and a blank page with just the Prestashop copyright text.

Back office is giving me this error when I try to access Modules:

Attempted to load class "ImportModule" from the global namespace.
Did you forget a "use" statement?

in modules\importerosc\importerosc.php (line 30)

Really appreciate you helping me Leo, but I'm thinking this is a lost cause. Should I try to update to a lower version of 1.7, or is this going to happen whichever version I try to update to?

Thanks,

Andrew

Link to comment
Share on other sites

I don't know what it is, but I removed all the non-native modules before attempting the 1-Click update (by which I mean I uninstalled all modules that were not originally supplied as part of Prestashop 1.6).

I think I'll have to go down the migration route, as this seems to be the safest option, and it will ensure I start with a 'clean' install of 1.7.

Thanks again for your help!

Andrew

Link to comment
Share on other sites

 I Have also upgrade to 1.7.0.0 , now I can not reach my admin/backoffice or website anymore. 

I had this error while updating.

 

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

Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 7.1.3". You are running 7.0.33. in /home/xxxxx/ww. xxxxx.be/vendor/composer/platform_check.php on line 24

{"nextQuickInfo":["[SKIP] directory \"\/app\/cache\/\" does not exist and cannot be emptied.","[CLEANING CACHE] File prod removed"],"nextErrors":["[INTERNAL] \/home\/xxxxx\/ww.xxxx.be\/vendor\/composer\/platform_check.php line 24 - Composer detected issues in your platform: Your Composer dependencies require a PHP version \">= 7.1.3\". You are running 7.0.33."],"error":true,"next":"error"}"

I had also  error on MOLLI, PAYMENT module ,  , i removed this module from  ftp , but no succes . 
 

for this moment site +, backoffice is 100 % offline 


‘this actions, also no succes , ( FULL RESTORE ) 

I Set php switcher on 7.3 php , and did a full restore , 

I set again php Switcher on 7.1 , again a full restore  , but no succes 

 I can only reach , cpanel or FTP , to see my files 

Is there a way to  remove the prestaschop installation , ( FTP ) then upload previous version 1.7.6.9 on ftp ?

or  must I  start from zero again , hopefully not ! 

thanks for advice and help ! 
regards Jean 

 

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

Hi,

from the error it seems that you need to do 2 things:

Create the folder /app/cache/, as it does not exist and cannot be emptied"

Also you/or your hosting should switch the  PHP to version version 7.1.3 or higher, here you have the PHP compatibility chart: https://devdocs.prestashop.com/1.7/basics/installation/system-requirements/#php-requirements

About the site restore back to the old version you should ask the hosting as they usually have backups of files and database back to a couple of days , and they can restore it, also if you have the files nd database these can be restored also to the old version.

Kind regards, Leo

Edited by Leo @ Prestachamps (see edit history)
Link to comment
Share on other sites

Hi ,thanks,for help 

I know the requirements, realy ,  2 weeks  ago I did  PHP switch  on 7.3 then Full restore , not many users read then before updating 

We did , about 5 restore older versions , also set different versions PHP with restore.

Again  PHP switch to 7.1  and  did full restore 

Again  PHP switch to 7.3  and full restore, it thouse not help , 

I get this message on the website url now 

500 Server Error

Oops, something went wrong.
Try to refresh this page or feel free to contact us if the problem persists.

 

Again  PHP switch to 7.1  and  did full restore 

Again  PHP switch 

 

What do you mean about  

Create the folder /app/cache/, as it does not exist and cannot be emptied"

create  ( NEW ) /app/cache folder on the root ? 
Or just empty if old  folder exist on server ? 
 

Thanks for help, ,Jean 
 

 

 


 

Link to comment
Share on other sites

Hi, 

I was referring to the file consistency!

You said above

Quote

{"nextQuickInfo":["[SKIP] directory \"\/app\/cache\/\" does not exist and cannot be emptied.","[CLEANING CACHE] File prod removed"],"nextErrors":["[INTERNAL] \/home\/xxxxx\/ww.xxxx.be\/vendor\/composer\/platform_check.php line 24 - Composer detected issues in your platform: Your Composer dependencies require a PHP version \">= 7.1.3\". You are running 7.0.33."],"error":true,"next":"error"}"

 

which pinpoints out that you're missing folders ?

 I'm just presuming from the msg above. 

 

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...