Published
8/30/2016
Categories
E-Commerce

How to Fix Your Custom Theme After Magento 2.1.0 Upgrade Breaks It

Magento

Recently we upgraded a client site from Magento 2.0.7 to Magento 2.1.0, and discovered that our custom theme broke after the upgrade.

Below is some information that we hope will help other developers who encounter a similar problem.

Software versions (before upgrade)

  • Apache 2.2.29

  • PHP 7.0.8

  • MySQL 5.6.25

  • Magento 2.0.7

  • and a custom Magento theme

Steps to reproduce

  1. Follow instructions and upgrade Magento from 2.0.7 to 2.1.0 (reference: http://devdocs.magento.com/guides/v2.1/release-notes/tech_bull_21-upgrade.html)

  2. Run “php bin/magento setup:upgrade”

Analysis

It seems, some bad left-over data on the database is corrupting layout XML processing. The layout XML extending via theme layout files are NOT applied to rendered pages.

Solution

Remove the custom theme completely, then re-install it.

  1. At back end, “CONTENT” => “Configuration”. Replace the custom theme with the Blank theme

  2. At back end, “CONTENT” = > “Themes”. Select the custom theme and “Delete”

     

    (important !!)

  3. Backup all custom theme files and directories

  4. Remove all custom theme files and directories from app/design/frontend/

  5. At command line, run “php bin/magento setup:upgrade”

  6. Make sure Blank theme is active, and the custom theme is NOT listed under “CONTENT” => “Themes”

  7. Restore the custom theme from the backup

  8. At back end, make sure the custom theme is listed under “CONTENT” => “Themes”

  9. At back end, “CONTENT” => “Configuration”. Set the custom theme.

  10. At command line, run “php bin/magento setup:upgrade”

________________________ Endertech is a Los Angeles Tech Company able to provide Magento solutions for your Ecommerce Website needs. Contact us for a free consultation.