Jump to content

[solved] Another failed upgrade!


Recommended Posts

I've just attempted to upgrade from 1.6 to 1.7 using the upgrade module and it all went pete tong (surprise), now I just went ahead and copied all the files over to do a manual install and at the dbase connection screen I'm faced with the message "At least one table with same prefix was already found, please change your prefix or drop your database" which, presumably, means I'm not upgrading but performing a fresh install, something which we can't do because we need our dbase as it's full of products and customers.   I've tried going to /upgrade but it just takes me back to the dbase screen and same message.   Can anyone offer any advice as to how to proceed with this, I don't want to chance overwriting our dbase, files I can handle but not the dbase.

EDIT***

As an after thought, I deleted the install folder and went straight to the admin panel (Just in case the upgrade went ahead), tried logging in and got

Quote

Oops! An Error Occurred
The server returned a "500 Internal Server Error".
Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.

.... and now checking the cpanel I can see our Physical Memory & I/O Usage has went through the roof !! Anyone?! 

Cheers

Marko

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

Hi, There are several same topics over the forum with same problem. You tried to use the search bar for it ?

 

and so on. Follow the suggestions given there.

Furthermore, you should activate debug mode AND read the server error logs. 500 error is a server error and precise details are specified in the server error logs.

Link to comment
Share on other sites

13 minutes ago, selectshop.at said:

Hi, There are several same topics over the forum with same problem. You tried to use the search bar for it ?

I did, but the vast majority of the issues faced by other people were unsolved and if I'm honest trying to follow the other thread just left me even more confused, I have enabled debug and for attempting to call the upgrade page throws back the following, I have checked perms and all "appears" to be fine ...

Quote

Fatal error: Uncaught PrestashopInstallerException: Language gb not found in /home/xxxxxxxx/public_html/src/PrestaShopBundle/Install/LanguageList.php:100 Stack trace: #0 /home/xxxxxxxxxx/public_html/install/upgrade/php/migrate_tabs_17.php(57): PrestaShopBundle\Install\LanguageList->setLanguage('gb') #1 [internal function]: migrate_tabs_17() #2 /home/xxxxxxxxxx/public_html/src/PrestaShopBundle/Install/Upgrade.php(482): call_user_func_array('migrate_tabs_17', Array) #3 /home/xxxxxxxxxx/public_html/src/PrestaShopBundle/Install/Upgrade.php(825): PrestaShopBundle\Install\Upgrade->upgradeDb(Array) #4 /home/xxxxxxxxxx/public_html/install/upgrade/upgrade.php(92): PrestaShopBundle\Install\Upgrade->run() #5 {main} thrown in /home/xxxxxxxxxx/public_html/src/PrestaShopBundle/Install/LanguageList.php on line 100

 

Link to comment
Share on other sites

OK, so tried and failed miserably multiple times - even delved into all the minimum requirements for 1.7 and we meet or exceed the requirements.   Files go across no problem but the second the upgrade touches the dbase it kills the install. 

Quote

 

ops, something went wrong.

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

 

 Another attempt at a manual upgrade did not fair any better, but I've went back again and looking at the 1-click upgrade requirements I can see that "PrestaShop requirements are not satisfied" takes me to the announcement for obsolete PHP versions, and we're currently on PHP7.2 which meets the requirements.   Am I sniffing glue here or what?.   I'm going to try another manual upgrade, disable GB and all non-native mods and if it doesn't work I'll copy and paste the exact messages I'm getting in the hope we can nail this bugger.

Cheers

Marko

Link to comment
Share on other sites

Yep, uploaded the files, tried upgrading and ...

Quote

This page contains the following errors:
error on line 1021 at column 1: Extra content at the end of the document
Below is a rendering of the page up to the first error.

The page contains a lot of, presumably, updating of the dbase with a lot of [OK] but at the end we have ...

Quote

Table 'xxxxxxxxxx_db730126878.ps_info_lang' doesn't exist

Immediately after that line, we have 2 blank lines and the lines, 1020 and 1021 which is mentioned above, I'm now wondering is the error relating to the ps_info_lang that doesn't exist, or is it because of these blank lines and if the latter where do they come from?!

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

OK, another update, and for fear of talking to myself, anyone please feel free to jump in, I CAN actually access the backend now (as well as the front end) but I'm very limited to what I can do.   It has upgraded, but it's not letting me do a great deal, if I click on anything I get errors like ...

Untitled.thumb.png.993273dc8f7cff8ab5d4182453de5513.png

Link to comment
Share on other sites

Debug showing ...

Quote

Fatal error: Uncaught Unknown column 'ma.id_authorization_role' in 'on clause'<br /><br /><pre> SELECT r.`slug` FROM `ps_authorization_role` r INNER JOIN `ps_module_access` ma ON ma.`id_authorization_role` = r.`id_authorization_role` WHERE ma.`id_profile` = "1" </pre> thrown in /home/xxxxxxxxx/public_html/classes/db/Db.php on line 769

 

Link to comment
Share on other sites

Which SQL are you using ? Check php and all other requirements with phppsinfo.php suggested on https://devdocs.prestashop.com/1.7/basics/installation/system-requirements/

Check also permissions and give recursive permissions to folders and files suggested in here: https://devdocs.prestashop.com/1.7/basics/installation/ -> section file rights.

You disabled also all non-native things (themes, modules, overrides) as told before ?

Link to comment
Share on other sites

14 minutes ago, selectshop.at said:

Which SQL are you using ?

10.2.30-MariaDB

14 minutes ago, selectshop.at said:

Check php and all other requirements with phppsinfo.php

All came back OK

14 minutes ago, selectshop.at said:

Check also permissions and give recursive permissions to folders and files

Was working with 755 for folders and 644 for files

14 minutes ago, selectshop.at said:

You disabled also all non-native things (themes, modules, overrides) as told before ?

Modules, yes, theme was default, and I'm not entirely sure what we mean by overrides but I reinstated the en language, deleted GB, etc

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

Before added as a link there were also two other suggestions:

Disable module gamification. This module is useless and making several problems.

Delete all content of /var/cache/* This folder will create itself again. It's temporary caching folder.

Overrides and non-native modules you disable on back office "Advanced parameters -> Performance -> Debug section"

Link to comment
Share on other sites

Other than overrides, everything else was ok, I don't have gamification as a module, and I did try deleting the cache when experiencing the issues before but to no avail, I've had to restore the site back in the meantime but I do anticipate trying another upgrade tomorrow and I will update the thread with what happens, but thanks for all the info and support so far, appreciated.

Marko

Link to comment
Share on other sites

OK, here's what I did just to recap ...

Disabled GB and replace with EN
Disabled non-native mods
Disabled overrides

After File Transfer
===================
FOLDERS - 755
FILES - 644
Recursive as follows:

/app/logs
/app/Resources/translations
/cache
/config/themes
/download
/img
/log
/mails
/modules
/themes
/translations
/var

Ran /install/upgrade/upgrade.php and browser returned another ...

Quote

This page contains the following errors:
error on line 1021 at column 1: Extra content at the end of the document
Below is a rendering of the page up to the first error.

Managed to log in anyway and getting this ...

Capture.thumb.PNG.9f496e97cf7e4d5a1983ebf195925772.PNG

I can navigate around some of the settings, but otherwise I either get access denied or it just craps out and tells me the page isn't working.   Personally, I think we're almost there, even the front end looks as though it's upgraded 'reasonably' well, but I can edit anything by the looks of it.   

Also, whilst on the dashboard, the activity overview constantly reloads and does not show any of the stats.

NB: Saw another thread regarding limited admin access and in particular dropping ps_access and uploading another, tried that, marginally more success than before, able to access other areas but still not right.   Even went through all the modules, etc, updating them all but then couldn't upgrade PayPal, deleted and attempted to reinstall fresh, still throwing errors about "ps_thisandthat" already exists so the long and the short of it all is I've tried over 3 days to upgrade the site and even though our site is not in any way heavily customised or full of third party mods, the upgrade, is not functioning as it should.   

The only realistic way that I can see anyone from 1.6 "upgrading" to 1.7 is by migration only which in itself is going to be a painful process for us also.   For now I've rolled back to 1.6 as we can't be offline for great lengths of time but I'm still open to any suggestions or pointers anyone can offer to help the process.

Cheers

Marko

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

Whilst it was quiet, I tried yet another upgrade and although it went much the same way as before, after the upgrade I cleared the browser cache completely and I'm using Chrome, this improved things again as before I couldn't edit any if the theme functions from the BO but after deleting cache this functionality reappeared although the front end was still a bit of a mess with the footer displaying info all over the place, but the stats in the BO dashboard appeared, and things were much more accessible.

Once this was done, I'd say we were pretty much 90% there, but also had to rehook a few important modules which I wasn't expecting to have to do, but more success them more I learn so fingers crossed that the next upgrade will hopefully be even more successful.

Fir now though, it would appear if we can somehow delete and recreate the theme this would hopefully sort out the front end looking so misaligned, can't be 100% but if anyone knows how that's done I'd appreciate the steer.

Link to comment
Share on other sites

Well, if you are using another theme as the default and you disable this theme, it is normal behavior that modules are unhooked. Most of non-native themes are using own modules, which are not available in the default (although name could be same!). Furthermore, if you upgrade from 1.6. to 1.7. you will need to upgrade your theme as well.

Link to comment
Share on other sites

I duplicated the site on a test area, copied everything across including the dbase and ran the upgrade, still had the usual errors, etc, but its up and running now after performing many of the steps above, but the front end skin was still a mess, footers and headers pretty much all over the place and looking very untidy.   Imported another theme, basic, and everything is looking a great deal better although I am still having issues logging in as a customer.   If I use the "sign in" link at the top of the page, it doesn't work, but If I browse the site and add something to the basket, THEN proceed to checkout I'm able to log in as a customer, but browsing any further just logs me out again, including trying to get back into the order screen just after ordering!.   Uninstalling and re-installing the "sign-in" module makes no difference, other than to completely remove the module from all positions which means we need to add it back into nav2!.

I read somewhere it could be to do with the password column changing from 32 to 60 and by importing the dbase it's screwed up but can't figure out how to fix that.

All in all, I'd say we're (hopefully) on the verge of completion once that issue is dealt with so if anyone can advice I'd appreciate it :)

Cheers

Marko

NB - spoke too soon - now getting "unable to update settings" when trying to edit a product, another bit of searching around shows people were having that issue back in 2017, presumably from upgrading too, will continue to try figure.

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

Well, after a lot of messing around with various settings in the back office of the test site, I cleared the cache from the Faceted search module and unbelievably customer logins started working again, even registrations were working!!.   I re-applied permissions to the folders again to see if that would help editing the products without throwing the "unable to update settings" error but all that happened is the site crashed out.   Not sure if it was something to do with reapplying the permissions or not, but I left the perms as they were and just restored the old site and dbase back to the test site and did the upgrade again, went through all the steps above again and this time I could edit the products and with a bit of fumbling managed to get the customer logins working again, so the test site was now completely up and running!!!

Thinking all was well, I went ahead and upgraded the main site and again went through all the steps above, however no matter what I did I just couldn't get customer logins or registrations to work again, nor can I now edit any products that has combinations so I'm literally at the point now where I probably have to admit defeat.  The upgrade just isn't going to work as smoothly as it should so the only option for us is to probably create another "test" site and perform a clean install of 1.7.xx and try to just recreate everything.  I'll try migrating customer data across at the bare minimum but I reckon it will be easier in the long run to just manually re-create all the other data, cats, products, etc, and if the customer migration doesn't go well I'm likely looking at having to rely on previous customers re-registering.

Never would I have believed that "upgrading" prestashop would be as difficult, tiring or as ridiculous as this and having spent the last week searching for answers on this forums it's clear there is a huge issue for many  trying to get from 1.6 => 1.7 and for many it appears they have given up and moved on to other platforms out of sheer frustration which is a shame, because Prestashop is a fine platform which is let down by what appears to be a lack of concise support in matters like this.   All respect to those who are here and try their best, but given the amount of threads which are left unsolved and fragmented it's like walking through treacle trying to find the answers.

 

Edited by AmicaSoap (see edit history)
  • Like 1
Link to comment
Share on other sites

  • TillyOak changed the title to Another failed upgrade!

So, I'm just trying to keep this thread alive as I believe there are many other fragmented threads all over these forums with similar issues to what I've experienced and "I think" I've managed to solve them all bar one.   Did ANOTHER duplication of the old site in a test environment and this time I left my "GB" language enabled and as default, enabled the "en" language (US) as this was previous disabled and left it as an additional language rather than make it the default one.   Ran the upgrade and received the usual errors as above, went through all the usual fixes, etc and this time I can now edit the products without any issues, even those with attributes/features, etc so I reckon having disabled the "GB" language whilst upgrading was the issue here but I have one last issue and that is that customers cannot login and new customers cannot register.   When an existing user attempts to log in, it just reverts them back to the log in screen although something clearly happens in the back end because the "Active Shopping Cart" then shows my customer account as having generated a cart.   Also, entering an incorrect password for the customer account shows "Authentication Failed" which clearly shows the issue isn't connectivity between the front end and dbase.   Adding items to the basket (still not logged in remember) and then checking out allows me to log in successfully but then the log in simply expires as soon as I move to another page.   

Similarly, trying to register a new account throws the following:

The length of property Customer->passwd is currently 60 chars. It must be between 0 and 32 chars.
at line 1003 in file classes/ObjectModel.php

Quote

998.             }
999. 
1000.             $message = $this->validateField($field, $this->$field);
1001.             if ($message !== true) {
1002.                 if ($die) {
1003.                     throw new PrestaShopException($message);
1004.                 }
1005. 
1006.                 return $error_return ? $message : false;
1007.             }
1008.         }

Even trying to amend this directly in the dbase makes no difference, and trying to add a new customer from the back office throws:

Quote

An unexpected error occurred. [PrestaShop\PrestaShop\Core\Domain\Customer\Exception\CustomerException code 0]

Then in debug it says:

Quote

Matched route "admin_customers_create".

Quote

"route" => "admin_customers_create"
  "route_parameters" => [▶]
  "request_uri" => "https://xxxxxxxxxxxxxxxxx.co.uk/adminxxxxxxxxx/index.php/sell/customers/new?_token=hoTUBL54asJujVS9oDnXAMqo9or85ZYa4iCUxDHxn6o"
  "method" => "POST"

If anyone can offer any assistance as to how this can be fixed I'd really appreciate it.   If I manage to get this fixes then I'll recreate the update process using all the steps I've already done and if it works again I'll create a step by step on how I did it and the steps involved which I hope may help a lot of other people :)

Cheers

Marko

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

  • 2 weeks later...

OK so resolved this and the other issues affecting the upgrade and successful implementation of PS1.7.   Unfortunately, having managed to get everything over to 1.7 I have to say, despite the efforts of everyone involved in the open source program, there is nothing particularly worthwhile in upgrading apart from (possibly) some better managed coding and security whilst the backend remains pretty much the same and the frontend is far less flexible or even pleasing to the eye.   Having said that, and to possibly assist anyone else attempting to upgrade, I've listed all the steps below that I had to take to successfully upgrade our 1.6.1.24 shop to 1.7, and whilst I can't be sure if it will help anyone, here's the info anyway ....

Reverted to PHP 7.1 from 7.3 (according to the docs 7.3 "could" be supported, but I found issues when trying to upgrade on PHP7.3)

Backup home directory & dbase
enable US-EN & set default (remarkably, it appears that if you DON'T have us-en enabled and as default, the upgrade will either fail or cause issues).   Additionally, it also appeared that by leaving our native language enabled as default, thus affected our ability to edit products with attributes after the upgrade, something which has affected many upgrades, the answer for us was to simply make sure en-us was default and our native language was left enabled, after the upgrade we disabled the en-us and made our native language default again, now able to edit products no problem.

Enter Maintenance Mode
Update 1-click-update to 4.10.1 (or latest) - even though we didn't receive any notifications via the dashboard of an upgrade available for 1-click-update, THERE WAS AN UPDATE AVAILABLE.

In Advanced => Performance
Disable non-native mods
Disabled overrides (we raised an issue as a bug, namely that users couldn't log in and new users couldn't register after the upgrade and were told to check we weren't using "overrides".   It turns out that even disabling the overrides didn't make a difference and they REMAINED ACTIVE DESPITE DISABLING THEM so it's worth remembering you MAY still have active overrides even though you disable this from the back end, how you figure that out and deal with them is anyone's guess but more on our issues below).

Clear all caches

Run 1-click-update

After Upgrade and managing to log in to back office
=============
As a precaution, clear all browser cache, particularly if you are installing/testing on the same domain.
Delete contents /var/cache/*
Delete table ps_access and restore using the attached ps_access file earlier in this thread (this resolved the "access denied" message most people see after the upgrade).

OVERRIDES (as mentioned earlier, unknown to us we had overrides on the site and couldn't disable them despite having done this from the back end, apparently it's a bug and for us the issue was users not able to log in or register after upgrade.   We traced it to the following:-

Edited override/classes/customer.php (must have been manual override)
FROM:
'passwd' => array('type' => self::TYPE_STRING, 'validate' => 'isPasswd', 'required' => true, 'size' => 32)
TO:
'passwd' => array('type' => self::TYPE_STRING, 'validate' => 'isPasswd', 'required' => true, 'size' => 60)

Updated ALL modules

In Localization
Change your language back to whatever your native language was and disable en-us if not using it.

A multitude of front end issues for us, namely alignments of menus, etc that all looked pretty ugly, along with the main menu just randomly throwing sub-cats all over the place with no thought to any type of alignment for the drop down menus, etc, tried installing another menu mod but that was just as ugly.   Eventually just gave up and went with the default menu.

However, on the product page, we noticed the descriptions aligned to the right of the page, rather than full width, here's how to sort that (not my code, taken from the forums)

How to set full width product description and features on product page?
=======================================================================
Open: /themes/classic/templates/catalog/product.tpl

Find line containg:

{block name='product_tabs'}
Insert code before this line:

</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div>

Additionally, there is a huge waste of space on category headings, where presumably a picture is meant to be placed, but in our case we didn't want that, and we were happy to just remove that space.   Here's how:

Remove big space from category header
=====================================
Remove following code from /themes/classic/templates/catalog/listing/category.tpl
{block name='product_list_header'}
    {include file='catalog/_partials/category-header.tpl' listing=$listing category=$category}
{/block}

Remember, when editing the templates you may need to flush the cache from the back end.
 

So all in all, a few weeks of hard slog to simply get to the point of the upgrade working, but with the front end not particularly pleasing to the eye.   We've decided to stay with 1.6 for the time being, and are currently looking at migrating to WooCommerce where it appears there is a great deal more support and they appear to be leading the way for ecommerce now and even having already tried a free module to migrate prestashop to WooCommerce worked flawlessly which raises the question of why was it so difficult to update and migrate to another version of prestashop when it is so easy to migrate to a separate e-commerce system?.  I understand it's pulling the detail from the dBASE and not upgrading the files, etc, therefore we may suggest that it's a simple migration procedure of data but we've never really had an issue with updating the files as such, it's always been an issue with the dBASE but I can't profess to know precisely what's involved.

For us, it's a sad situation because we've loved using Prestashop and still do, but the thought of "putting up with" 1.7 doesn't appeal for now, we may change our minds, I'm not sure, but either way, I hope some people find these instructions useful.

All best

Marko

Edited by AmicaSoap (see edit history)
  • Like 3
Link to comment
Share on other sites

  • TillyOak changed the title to [solved] Another failed upgrade!
  • 1 year later...

It’s a year later and I’m struggling with the same i.e. moving from 1.6.1.24 to 1.7.7.1. 
Forced to move by my ISP dropping PHP 7.2.  Or at least charging to stay on it.  
So I’ve been spending time getting my 1.6.1.24 to run under PHP 7.3 and having done that can try getting to 1.7 again.

so your notes are really useful. Many thanks. 

Link to comment
Share on other sites

  • 2 months later...

@TillyOak We read every word twice in this post. I've been with Prestashop for over 6 years. The upgrades are oddly too difficult compared the others. Many times we've had to revert to older versions to get back online and if we ever upgrade we wait 3 months to a year. 

Truly appreciated.

Link to comment
Share on other sites

  • 3 months later...

Prestashop upgrade is a pain in my opinion... Why is it a pain:

1. The database is super complex. It could be less complex! much much less complex. this would require redesigning Prestashop.

2. The structure of files is spaghetti like. Good luck finding what needs to be changed.

3. The requirements are not often met (php, server, etc) ( They should build prestashop on Docker to make it easier.)

4. No one click upgrade like WooCommerce or other softwares. There is a one-click module which is hard to get and  the backward migration is often faulty.

5. Prestashop has been around and the code is just an accumulation of codes and features so changing one code can affect the other codes.

6. Modules don't always follow the upgrades

So why do I even use prestashop? because it's fast and free. Magento is too beasty, Woocommerce is for kindergarten (not enough features), etc

So how do I do my upgrades:

1. I always have a backup of my cpanel or database/files and disable everything I do not need (modules, language, etc)

2. I fail the upgrade .... I never, I repeat, I NEVER go back with the one click migration tool as I find it buggy. (the database has already changed and files were already added so you'll get weird errors saying the table already exist!).

3. I read the log!!! and correct all the errors on the log (the migration log). One by one. This can be laborious.

4. once I migrate everything I test all the dashboard links/function and correct all the errors again.

Basically an upgrade in Prestashop is just debugging!!!!

But really... I hate Prestashop upgrades. I now decided not to take any clients requiring an upgrade because it's a waste of my time,

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