Jump to content

Shop unaccessible after failed 1-click upgrade


Recommended Posts

Dear Prestashop community,

 

About an hour ago I added the 1-Click Upgrade module to our small online shop that was running Prestashop 1.5.4.1 at that time. After I created a backup from the database, I put the site on maintenance (shop offline button) and ran the upgrade module.

 

The site showed me the progress: downloading new file, unzipping, upgrading, etc. All seemded to go well. Then the upgrade tool told me there were four modules he would do too. All the time I saw that sort of animated 'busy' sign running in small circles on the screen. Then it went wrong:

in closing/completing the upgrade, I saw some errors. The idiot I am did not take notes. It was a server error notification in the progress screen. Told me te consider contacting my server administrator.

 

The progess symbol wasn't there anymore, but when I clicked on the button to go to the homepage of the Backend, the site told me something was still running. So I cancelled and opened another window of my browser. There I looked up the site. First I saw the frontend. Slightly changed and seemingly fully functional. Next I logged on to the backend. Same thing: the welcome screen told me everything was fine and that I was running the latest version: 1.5.6.0 (if I am correct...).

 

After walking around in the backend for a few minutes I went back to the original upgrade window. Nothing had changed. I clicked on the close button, the site warned me something was still running and I thought 'yeah thats what you think, but I know you're done!', and confirmed closing.

 

After that my frontend and backend were blanc pages.

 

I turned on debugging.

Fatal error: Class 'Context' not found in .../htdocs/shop/config/config.inc.php on line 90

The dots in the code line I inserted, there was other info there ofcourse.

 

I think everything is still there and some small but crucial error in finishing/cleaning up caused by my killing the window is preventing our shop from working.

 

Can someone help me please?

 

Regards,

 

Jasper

Link to comment
Share on other sites

Since posting the above call for help, I have:

  1. Found the backup zipfile that 1-click upgrade made before doing the actual upgrade (but that seemed to have left out the img folder and a few .htaccess files, wich I think I found elswere in the backups I did have).
  2. Found an instruction on total restore after failed upgrade on doc.prestashop.com and with that emptied the database and all the files, recreated (imported) the old database, put all the old files back in the root folder of the shop.
  3. Found that I still get an empty white page when I visit the Frontend.
  4. Found out that I by now do get to enter the Backend, but without any possibilties to do something.

Like before I have the feeling that I am very close to having the shop back.

 

Hours and much reading has passed since this messed up. Getting pretty desperate now.

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

I did this:

Restoring you files and data

As soon as your FTP client is done deleting online files, start uploading the ones that were stored on your computer! As this process can take some time, it is important to not lose some precious minutes (and therefore potential sales) by keeping your shop offline for more time than necessary.

Restoring your files

This process is as easy as the one that you followed when backing up your files:

  1. Connect to your web server using any FTP client, such as FileZilla.
  2. Upload all files from your local backup folder into PrestaShop's online folder.

PrestaShop's online folder should be empty, so as to make sure new and old files do not conflict. If you didn't delete all online files (after you backed them up, of course), you must tell your FTP client to overwrite any existing file. You must not keep any trace of the files from the upgrade that failed.

Restoring your data

The process described here uses phpMyAdmin, which is a standard web tool. If you web host makes you use another tool for managing your databases, you will have to adapt this process to that tool. Check your webhost's documentation on the matter.

The data restoration process is as easy as the one you would follow when backing up data:

  1. Log into phpMyAdmin on your web server.
  2. From the main login screen, select "Databases".
  3. Click the name of PrestaShop's database to open.
  4. In the database screen, click the "Import" tab on the top set of tabs.
  5. In the import screen:
    1. In the "File to import" section, click the "Browse..." button and find your backup file from your data. It can be either the raw SQL text file (.sql), or a compressed version of it (.sql.zip, .sql.gzip, .sql.tar.gz, etc.).
    2. In the "Format" section, make sure the "SQL" format is selected.
    3. Click the "Go" button.
  6. The browser should start uploading the backup file.

If you have more than one backup data file, import them one after the other.

Finally, remove your maintenance page (named index.html). There you go: your shop is back online!

 

But in my case I am looking at a blanc page. After enabling debug it says:

Fatal error: Uncaught Table 'DB****.eq_shop_url' doesn't exist<br /><br /><pre>SELECT s.id_shop, CONCAT(su.physical_uri, su.virtual_uri) AS uri, su.domain, su.main FROM eq_shop_url su LEFT JOIN eq_shop s ON (s.id_shop = su.id_shop) WHERE (su.domain = 'www.equinovum.nl' OR su.domain_ssl = 'www.equinovum.nl') AND s.active = 1 AND s.deleted = 0 ORDER BY LENGTH(CONCAT(su.physical_uri, su.virtual_uri)) DESC</pre> thrown in /mnt/webl/***/htdocs/shop/classes/db/Db.php on line 607

Link to comment
Share on other sites

My problem is solved,but I could not have been saying that if I hadn't had help from a friend who's an expert on databases.

 

I was trying to restore everything to the old situation by replacing the site files on the server throught FileZilla. The 1-click upgrade made an automated backup which I found in folder \shop\admin\autoupgrade\backup in a zipfile and by dropping all database tables and importing them from the backup I had.

 

Only one thing went wrong, but I did not know or notice: the import in MySQL broke of somewhere at 70%. My friend helped me by importing the sql scriptfile in pieces. After that my old shop had been restored.

 

I think I could run the1 click upgrade again and maybe it would work. But for now I keep it like this and exercise my upgrade skills on a offline version of the shop. Which would have been smart to begin with of course...

Edited by JasperLangedijk (see edit history)
  • Like 1
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...