Jump to content

1-click update failed


Recommended Posts

I attempted an upgrade from 1.7.4.4 to 1.7.5.0, which failed but I lack experience or skill to know what to do.

I included the 'backup all files and images' during the update. This appeared to work. On completion I had two boxes with comments:

...........

73 modules will be upgraded.

[Ajax / Server Error for action upgradeModules] textStatus: "error " errorThrown:"Gateway Time-out " jqXHR: "

The page you are looking for is temporarily unavailable.
Please try again later.
[long number deleted]

..............

and a list of 'finished' entries, most of which were OK but three showed warnings:

[WARNING] SQL 1.7.5.0 1060 in ALTER TABLE `wp_supply_order_receipt_history` CHANGE `employee_firstname` `employee_firstname` VARCHAR(255) DEFAULT '', CHANGE `employee_lastname` `employee_firstname` VARCHAR(255) DEFAULT '': Duplicate column name 'employee_firstname'

[WARNING] SQL 1.7.5.0 1060 in ALTER TABLE `wp_product` CHANGE `reference` `supplier_reference` varchar(64) DEFAULT NULL, CHANGE `supplier_reference` `supplier_reference` varchar(64) DEFAULT NULL: Duplicate column name 'supplier_reference'

[WARNING] SQL 1.7.5.0 1060 in ALTER TABLE `wp_stock_available` ADD `location` VARCHAR(255) NOT NULL DEFAULT '' AFTER `out_of_stock`: Duplicate column name 'location'

Database upgrade OK
[SKIP] directory "/app/cache/" does not exist and cannot be emptied.
Warning detected during upgrade.
Rollback

..................................

The site appears to be unaffected so the rollback did seem to take place, even though the database upgrade says it was okay. The site was and still is in maintenance mode, not yet live. But I have no idea why the errors are there nor what to do about it. Please can anyone advise me?

Link to comment
Share on other sites

I have now discovered one error introduced which suggests a fault. I use combinations on nearly every product. Cleared cache, refreshed browser cache, website (in maintenance) works and has all combinations present. But in BO, no combinations remain in place. Nowhere to change numbers of product, no combinations there, would have to create combinations again to do anything.

Now attempting a full restore.

 

Link to comment
Share on other sites

Right, the warning for the employee_firstname` VARCHAR(255)  is correct as looking in the DB it is still (32) you can easy change that with phpmyadmin or with adminer. I have verified this with a clean install, so that warning is easy to solve. Same for product table change the 2 fields to 64, the last warning about location you can ignore as it is correctly done.

But it should not effect your combinations... really turn on your debug and dev and check error logs.

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

Regrettably, I picked up your note too late (thanks for trying to help, though I admit to a total lack of knowledge to how I could have changed the database). The following might help someone else:

I trusted the rollback in 1-click to get back to where I was. It states files are restored, it states database has been restored, but then follows up with this error after saying all has been restored: [INTERNAL] /homepages/36/d277[number continues]/htdocs/[shopname]/classes/shop/Shop.php line 347 - Invalid argument supplied for foreach()

Then:

[INTERNAL] /homepages/36/d277[number continues]/htdocs/[shopname]/config/config.inc.php line 123 - Error: Call to a member function getName() on null #0 /homepages/36/d277[number continues]/htdocs/[shopname]/modules/autoupgrade/classes/UpgradeContainer.php(475): require_once() #1 /homepages/36/d27743760/htdocs/[shopname]/modules/autoupgrade/classes/TaskRunner/AbstractTask.php(120): PrestaShop\Module\AutoUpgrade\UpgradeContainer->initPrestaShopCore() #2 /homepages/36/d277[number continues]/htdocs/[shopname]/admin[restoffilename]/autoupgrade/ajax-upgradetab.php(51): PrestaShop\Module\AutoUpgrade\TaskRunner\AbstractTask->init() #3 {main}

And the whole shop was written off. The domain shows a server 500 error and nothing else. I've taken out the [shopname] and the access address and replaced a number in the above error as I assume these could be security issues

I tried, in sort of desperation, to run the rollback a second time. This completed and reported success, and indeed the shop is back up as 1.7.4.4, and combinations are working again in BO

For me, it's been a salutary tale not to try to upgrade ... which is a shame, as I had hoped to keep up to date with 1.7. For trying again, I'm now wary but willing try try to solve things. But something is not working right.

Link to comment
Share on other sites

Never be hasty... make sure you backup of the mysql and all files as both together are the shop 🙂

In your hosting account you should have phpmyadmin, [depending with who you host and your control panel] change a field properties is scary first time, but when you have done it a few times its OK, but again be relaxed and double check before you press enter.

Adminer is a great tool to do this if your hosting has not phpmyadmin, it's free and very reliable!

In the logs you also see folders missing, just create them then they are there for next update.

But you must check you are using PHP v7.2 and check other required settings, you can do that with a script found here upload it in your hosting account and browse to it, it will give you a check if the environment is perfect for the shop, this is very important and avoid errors in future upgrades.

Let me know if this helps.

www.yourdomain/psphppinfo.php

 

 

 

psphpinfo.php

  • Like 1
Link to comment
Share on other sites

phpmyadmin is available, that's fine. php is 7.2. This is a relatively recent installation (December) of 1.7.4.4, at which time all the parameters checked out for the installation and I assume are still good for the new version. Prestashop reported everything was perfect then. I've made changes to the files, but only in theme and added modules, which were disabled before the update.

Which to me means that updating is not very easy, given everything ought to be 'standard'.

Link to comment
Share on other sites

Not had a chance yet to check with that script, but I have a hosting report printed off for php.ini settings. Max execution is 50000. I think the current prestashop partner is what used to be called 1&1 and now is Ionos, which is the web space provider, so I'd have thought that a standard install would have satisfied required parameters. I will check again though.

Link to comment
Share on other sites

50000...that's loco lol.  also note: a phpinfo may not reflect run-time PS as it can/will update some php settings at runtime.  and  check local value not master.  Here is free module to show you your PS runtime PHP settings.

https://www.prestaheroes.com/en-us/modules/prestashop-module-display-phpinfo-phpini

here is generic upgrade project that has little to NO production downtime

when we do upgrades, we do it  on a copy of production and when ready we replace production with new copy and import out of sync customers/orders..there may be more depending on your shop....

=== checklist .doc'ing

  1. identify all 3rd party modules and obtain their 1.7 compatible zips
  2. identify core changes (mentioned above), you should also identify template changes (.tpl's).
  3. .doc existing overrides
  4. select new feature rich theme, we like Leo themes but there are lots of others
  5. review existing hosting, most age just like your shop.  it's best to get new hosting account and move to that rather than try to have old hosting upgraded

===  pre upgrade

  1. build a test copy of your production shop, then back this up so you can refresh your test system until upgrade completes.  hopefully your hosting allows php level by domain/subdomain so you start out with php7.2.  if not  find new hosting.  
  2. uninstall 3rd party modules
  3. make sure overrides clean
  4. up php max execution time to 'large', 600 or 1200...

===  upgrade

  1. back up this test system so you can restore if upgrade fails so you do not have to uninstall moudule/override again
  2. perform upgrade 
  3. install/configure modules
  4. apply core changes
  5. install configure theme

===shake and bake until prod ready

== Production installation

  1. create a new copy of production to be used for historical purposes
  2. import customers/orders from old shop to new shop
  3. copy new shop to production or if new hosting (recommended) switch dns 

happy upgrading

el

Link to comment
Share on other sites

Thanks for all the advice (both of you)

I installed your module. Reports: max execution time (local) 0 and (master) 50000

I ought to stress that this is whatever was set by default, either through Prestashop or a module that has modified it, or by the 1&1 settings (I assume the latter)

Your plan of preparing a new install then importing customers etc, is exactly what I am doing. The old 1.6 shop is running still; the new one in 1.7 is very nearly ready to make active. Customers are imported already (but I will top up as the new shop goes live); new modules installed, everything running fine. I just thought to update to 1.7.5 before finishing (this version having come out since I started).

     
  • Like 1
Link to comment
Share on other sites

see hosting control panel.  We use plesk...but have seen it all.  With plesk you can modify the php settings easily enough including max execution time.   At least know you could say modify .htaccess to set php value and with module see if updated, a phpinfo in root would not be able to tell you that...

you did not mention high quality 3rd party theme so assume default theme.  post production you can then on test copy install a modern paid theme.  Now themes come with built in mega menus,  as mentioned we use particular 3rd party dev themes...the number of tools compared to even 1.6 compliant theme are very feature rich....now desktops are looking like mobile requires a few more tools than default theme has...sorry to go on, we have new floor being put in and have to skip my nap.

Link to comment
Share on other sites

High quality theme, paid for, is in use (not default). The developer was extremely helpful with solving some bits and pieces that I wanted to display differently - this is a theme purchased through Prestashop.com

 

 

  • Like 1
Link to comment
Share on other sites

yes the floor.  we are at winter home in Medellin, Colombia (from Kansas City,  Missouri) and the floor, they will actually cut porcelain in the house, I ran them out to front of the house but everything here is concrete......you would think we would leave the house but it's been 10 days so we can only shop so much....I often think of importing higher end tile cutters as here here not very efficient and under powered but hey you can carry it on a moto...lol 

back to themes...with 1.7 template overrides we get cool new tools and many more to come.  dev's can now modify/delete/add front office content where before they could only 'add'....much like shopify 'liquid' templating.  the move to twig will continue as smarty future is a bit fuzzy to say the least.  

what we see post 3rd party theme is decrease in performance, out of box default theme...we see A's across the board....thank you PS  for one ccc of .js/.css for 'all' pages, really incredible and ahead of the curve.

it would be incredibly boring to work with ecommerce that would not burn down the house to make a better sustainable framework.....

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