Saturday, August 18, 2012

PrestaShop Tips - PrestaShop 1.5 RC2 - An error occured during installation


Notice:

It seems the package I downloaded is not a completed one. Maybe the original files was not good.
I downloaded another package 2 days later. that one was working properly.
So if you encounter the same issue, I strongly suggest you to download the package again.



PrestaShop team released PrestaShop 1.5.0.15, also known as RC2(Release candidate 2). It is a good news because that means we will finally get the final release of PrestaShop 1.5 soon.

So I tried to install this version to make test. but there was a few issue when I tried to install this PrestaShop RC2. The first issue I encountered was that the package was corrupted, I guess there was some trouble on PrestaShop site, there are forum members reported the same issue. Fortunately the issue now has been fixed and we can download it now.

The issue

After I download the PrestaShop 1.5 RC package, and tried to install it, I chose all default selections and got following error when progress bar displayed 38%

  1. Create settings.inc file
  2. Create database tables
  3. Create default shop and languages
  4. Populate database tables

An error occured during installation...

You can use the links on the left column to go back to the previous steps, or restart the installation process by Click Here
There was no detailed information on what was wrong, so I tried to clear database and redo the installation, but got the same error.

So I have to spent close an hour to debug to find out the cause and fixed the issue.

Cause

The issue was caused by a missing file "image.inc.php" under root folder, it is used in /install/classes/xmlLoader.php as following


public function __construct()
{
$this->language = InstallLanguages::getInstance();
$this->setDefaultPath();
require_once _PS_ROOT_DIR_.'/images.inc.php';
}


Solution

The fix is very easy, just copy the missing file from previous version of PrestaShop and the error will be done. I got this file from PrestaShop RC1.

Hope this help others who are facing the same issue.

Notice:

It seems the package I downloaded is not a completed one. Maybe the original files was not good.
I downloaded another package 2 days later. that one was working properly.
So if you encounter the same issue, I strongly suggest you to download the package again.