FUTURE VERSIONS WILL ALREADY HAVE THESE FIXES PLUS MORE!
Ok I'm trying to improve the upgrade script for 2.2.x and going forward. I've tweaked some things to improve memory usage, clean up old ocmod files, etc. So please test when you can and report any issues you have with it.
How to use:
Common Errors and Solutions:This package should replace the existing "install" folder from 22.214.171.124 when you first unzip.
1. Download the OpenCart 126.96.36.199 zip file (do not use this script for any other version. Newer versions may already have updated versions of the upgrade script.)
2. Upload all files and folders from inside the "upload" folder to your server EXCEPT for the "install" folder. Overwrite the existing files on your server. You do not need any file outside of the upload folder.
3. Download my upgrade package from the bottom of this post
4. Upload the "install" folder within to the root of your store. The same place you uploaded admin, catalog, etc
5. Run the upgrade script by going to6. After upgrade, login to your admin and goto User Groups and edit the Top Administrator and check all boxes so that you have permissions to access the new files.
Code: Select all
It should support any version from 1.5.0 or later
You should be able to run it multiple times without error.
The first patch file (1000.php) will take the longest as that is where the dynamic database parsing script is and that can take a long time. Feel free to run the upgrade script a few times. It should be fine to run multiple times.
"Allowed memory size of xxxxxx bytes exhausted"
This means your server memory is lower than it needs to process the upgrade. This usually happens on the first patch file (1000.php) because it has a lot to do.
- Edit the install/php.ini file and change memory_limit = 512M; to memory_limit = 1024M;
- Create a "disabled" folder in install/model/upgrade. Move all upgrade scripts except for 1000.php into the disabled folder. Now edit the install/opencart.sql file and split it up into 4 or more smaller chunks of total steps. Keep a copy of the remaining steps and add small chunks to the opencart.sql file, save to your server and rerun the upgrade script multiple times, pasting and overwriting a new chunk from the remaining sql code until you finish it all. You may need to try a few times how many lines your server can handle at a time. Then on the last batch, restore the other upgrade script files back to the install/model/upgrade folder and let the upgrade run all patch files.
"select ..... returns more than one record"
I've seen this on sites that have multilingual url alias mods. The core script doesn't expect this and searches based on the query. If you have multiple languages it will return more than one record for url alias and choke. Install the updated 3rd party mod for multiple language url alias to satisfy the requirement. Or delete the language_id column from the url_alias table manually.
Things to expect after upgrade:
Please post any errors not shown here so that we can try to mitigate them in future updates.- 3rd party modules from 1.5.x to 2.x should be automatically disabled to avoid errors. "Modules" are the blocks on your store front. Basically any module found that has a "position" value but isn't one of the core modules will be set to a status of 0
- 3rd party extension from previous versions MAY NOT WORK. If coming from 1.5.x to 2.x you will see an error like "Indirect modification of data.... blah blah". That means that module needs to be updated for 2.x
- Your custom theme WIL NOT WORK. The upgrade script forces you back to the default theme so that you can limit your downtime.
- ocmods will be cleared and disabled. You will want to check that the scripts that are installed are valid for 2.2.x before reactivating them.
- vQmod will need to be updated to the latest (2.6.1 or later). You will also likely want to move your vqmod/xml scripts into a subfolder called "disabled" to prevent incompatible scripts from running after vQmod is reinstalled. Don't forget after uploading the new vQmod files, gototo run the vQmod installer.
Code: Select all
- Your site should look like the default opencart theme with your products and data.