Issue: Cache rebuild fails on step 5
Having announced the availability of X-cart 5.2.2, we saw several alike complaints: Cache rebuild fails on step 5, and the store would return an error. Investigating the problem we found out that it appears in those store, which run on servers with MySQL v.5.6. This problem is not in X-Cart core, but in the upgrade process itself.
Origin – bug in Doctrine
The further research shown that it’s caused by a bug in Doctrine
. Doctrine is responsible for the work with database in X-Cart 5. If you have an account with Doctrine, please +1 there to raise the priority of this bug fix. Meanwhile we implemented a workaround.
How to fix the store if you already faced the problem
We always recommend creating backups before making any changes. If you started the upgrade of your X-Cart 5.1.x based store and also faced the problem with incomplete upgrade process, please restore it from backup, and start from scratch.
The store will start upgrading directly to v.5.2.3 where the workaround is already implemented.If you have no backups, there’s an instruction from our architects:
- Download this archive with file “Database.php” and unpack it.
- Put the file in folder classes/XLite/Core/. Such a file already exists there, so you will need to replace it with the new one. It’s very and very unlikely that you customised this file within some modification, so it’s pretty safe just to replace the file instead of patching it manually.
<!–li> Drop your site's cache as described in X-Cart knowledge base here
- Delete the folder var/run and the file var/.rebuildStarted in your X-Cart installation folder
- Open the admin area of your store with the upgrade parameter in the URL (%yourstoreURL%/admin.php?target=upgrade) in your browser.
- When you log in to the admin area, you will see the notice that the Upgrade to v.5.2.3 is available. Initiate the upgrade. During the upgrade the store will inform you that “Some files are modified” and ask if to replace them or not. (see screenshot below). File “Database.php” MUST be replaced, so you should either select “replace all files” or select “do not replace selected” and make sure that there’s NO checkbox next to /XLite/Core/database.php
What to do if I haven’t started upgrade yet?
You may start the upgrade process now. Your store will start upgrading to v.5.2.3, where the problem is already fixed.
Measures taken on our side to prevent this in future
Starting from next release, to make the upgrade process more stable we will implement the waterfall upgrades scheme.It is impossible to emulate all the cases during the QA phase, that’s why we want to double check the upgrade procedure on a private test group before making it publicly available. The first wave will be available only for a certain list of dev stores. After checking and corrections (if necessary) we will make upgrade available for all the other stores. We will provide more details about it together with the release of X-Cart 5.2.4