Close [x]

Technical Bulletin

Edit this page on GitHub

Magento upgrade issues (Jan. 28, 2016)

This bulletin informs you of the following issues:

Issue: Upgrade failures

Magento Community Edition (CE) and Enterprise Edition (EE) upgrades failed in any of the following circumstances:

We addressed the following issues:

  • Missing .gitignore files that resulted in exceptions
  • An error related to the updater application and PHP 7:

    PHP Warning: require_once(/public_html/magento2/update/vendor/autoload.php): failed to open stream: No such file or directory in /public_html/magento2/update/app/bootstrap.php
    

The following table summarizes what you need to do.

Upgrade path What to do
Magento CE or EE 2.0.2 installed or you haven't installed Magento yet.

No action is required. Install version 2.0.2 if you haven't already.

You can ignore this bulletin.

Magento CE or EE 2.0.0 to 2.0.1 Apply the fix
Magento CE or EE 2.0.0 to 2.0.2 Apply the fix
Magento CE or EE 2.0.1 to 2.0.2 Apply the fix
Any of the preceding and your Magento server runs PHP 7

Apply the patch and the fix

Note: You must apply the PHP 7 patch whether you installed the Magento software using a compressed archive or the Composer metapackage.

Detail

Our compressed archives for CE and EE were missing .gitignore files and, as a result, exceptions prevented the upgrade from completing successfully. We updated the magento/magento-composer-installer component so it reports missing files instead of throwing an exception with no details about what was wrong.

At the same time, we fixed a separate issue that prevented upgrading if you use PHP 7. (The fix for this issue is a patch that you must apply separately from the .gitignore issue fix.)

Use the following resolutions:

PHP 7 patch

If your Magento server runs PHP 7, you must apply a patch first.

To apply the patch:

  1. Download one of the following patch archives. Patches are available in the following formats: .zip, .tar.bz2, .tar.gz

    Magento edition Patch location
    Magento CE

    www.magento.com/download

    Follow the instructions on your screen to download MDVA-84.*

    Magento EE merchant portal Use the following steps:
    1. Go to www.magento.com
    2. In the top horizontal navigation bar, click My Account.
    3. Log in with your Magento user name and password.
    4. In the left navigation bar, click Downloads.
    5. Click Magento Enterprise Edition 2.X > Magento Enterprise Edition 2.x Release > Support Patches
    6. Follow the instructions on your screen to download MDVA-84.*
    7. Transfer the patch to your development system.
    Magento EE partner portal Use the following steps:
    1. Log in to partners.magento.com
    2. Click Magento Enterprise Edition > Magento Enterprise Edition 2.X > Magento Enterprise Edition 2.x Release > Support Patches.
    3. In the left navigation bar, click Downloads.
    4. Follow the instructions on your screen to download MDVA-84.*
    5. Transfer the patch to your development system.

    Use the same patch whether or not you installed optional sample data.

  2. Extract the patch in your Magento installation directory.

    Log in as or change to the Magento file system owner. Use one of the following commands to extract the archive.

    File format Command to extract
    .tar.gz tar zxf <filename>
    .zip unzip <filename>
    .tar.bz2 tar jxf <filename>
  3. We recommend you upgrade to version 2.0.2.

Resolution 1 (using version 2.0.0 or 2.0.1)

To resolve the missing .gitignore files issue using this method, all of the following must be true:

  • You must have command-line access to your Magento server
  • Your server must be running Magento 2 CE or EE version 2.0.0

    To confirm the version, you can either look in the lower right corner of the Magento Admin or you can use the php <your Magento install dir>/bin/magento --version command.

To resolve the issue:

  1. Log in to your Magento server as the Magento file system owner.
  2. Change to your Magento installation directory.
  3. Run the following command:

    composer update magento/magento-composer-installer
    
  4. If prompted, enter your authentication keys.
  5. Make sure magento/magento-composer-installer is version 0.1.6
  6. Run the following commands in the order shown:

    composer require magento/product-community-edition 2.0.2 --no-update
    composer update
    

    You can upgrade to either magento/product-community-edition 2.0.2 or magento/product-community-edition 2.0.1; we recommend 2.0.2.

  7. After the commands complete, enter the following command to update the database schema and data:

    php bin/magento setup:upgrade
    
  8. Verify your server is running version 2.0.1 or 2.0.2 in any of the ways discussed earlier in this resolution.

Resolution 2 (upgrade to 2.0.1 or 2.0.2 has failed)

To resolve the missing .gitignore files issue using this method, all of the following must be true:

  • You must have command-line access to your Magento server
  • You must have attempted to upgrade to either 2.0.1 or 2.0.2 and failed

You must run composer update twice to update components and then delete two files: one that recorded the failed upgrade and another that tells Magento your store is in maintenance mode.

To resolve the issue:

  1. Log in to your Magento server as the Magento file system owner.
  2. Change to your Magento installation directory.
  3. If prompted, enter your authentication keys.
  4. Enter the following command:

    composer update
    
  5. Make sure magento/magento-composer-installer is version 0.1.6

    The following exception might display; it鈥檚 expected:

    [ErrorException]
    Source /var/www/html/magento2/vendor/magento/magento2-base/dev/tests/integration/.gitignore does not exist
    
  6. After the command completes, enter the same command again:

    composer update
    
  7. Wait while the command completes.
  8. After the command completes, enter the following command to update the database schema and data:

    php bin/magento setup:upgrade
    
  9. Delete the following files from <your Magento install dir>/var directory:

    • .update_error.flag
    • .maintenance.flag
  10. Verify your Magento version is 2.0.1 or 2.0.2 in any of the following ways:

    • Using the php <your Magento install dir>/bin/magento --version command
    • Log in to the Magento Admin. The version displays in the lower right corner of the page.
  11. We recommend you upgrade to version 2.0.2.

Resolution 3 (does not require command line access)

To resolve the missing .gitignore files issue if you have no command-line access to your Magento server, install version 2.0.2 on a local machine and transfer the Magento codebase to your Magento server using FTP or a utility provided by your shared hosting service.

Error during upgrade: 鈥淲e鈥檙e sorry, we can鈥檛 take that action right now鈥

If this message displays during your upgrade, it can mean any of the following: