How to upgrade Open Cart 2.2

1. Back up the files and database. You can backup the database with the opencart backend tools or phpMyadmin – I did both.

2. then I’m going to look at the extensions that I already installed to see if they are still going to work. – they appear to be okay…

3. Then I download the latest version of opencart remove the config files from upload and upload/admin

4. then I upload all the files in the upload file, overwriting all the old ones.

5. then I visit www.mysite.com/install

and….
wouldn’t you know it….

…error message

Catchable fatal error: Argument 2 passed to Event::trigger() must be of the type array, string given, called in /home/adasecur/public_html/mysite/system/storage/modification/system/engine/loader.php on line 119 and defined in /home/adasecur/public_html/mysite/system/engine/event.php on line 19

so… search forum – no answers that I can find. Lots of folk with same problem.

… revert to old version… it works again.

I can see there’s a new version in the not so far distant future with opencart 3 due to launch soon. But 2.3 is as far as I can go with stable releases at the moment and it doesn’t inspire confidence that it doesn’t do the jump from 2.2. to 2.3. readily fingers crossed someone in the forum will help me.

I looked at https://forum.opencart.com/viewtopic.php?f=181&t=163546 for some advice too but it’s unhelpful.

I really like opencart but in some ways it’s quite un-welcoming and niche, I’m so used to wordpress where when it’s time to upgrade they make it as easy as possible so that vulnerabilities are removed from existing installations and security updates are automatically run. Opencart could learn from that I think.

Soooooo…..

Having received no help from the opencart forum I tried again. The process was the same except for the fourth stage;

 

4. then I deleted the existing files and uploaded the new ones in their place instead of overwriting them.

5. then I visit www.mysite.com/install and it tells me to:

Check your server is set-up correctly

  • Post any upgrade script errors problems in the forums
  • After upgrade, clear any cookies in your browser to avoid getting token errors.
  • Load the admin page & press Ctrl+F5 twice to force the browser to update the css changes.
  • Goto Admin -> Users -> User Groups and Edit the Top Adminstrator group. Check All boxes.
  • Goto Admin and Edit the main System Settings. Update all fields and click save, even if nothing changed.
  • Load the store front & press Ctrl+F5 twice to force the browser to update the css changes.

BUT I can’t actually log into the admin area!

It is looping back to the upgrade page over and over again – so I’ve reverted back to 2.2 again!

The way I finally managed to do this was to do a completely new installation of opencart and import the products tables.

Related Posts