Magento Connect – compatibility issue wiped out my eBay plugin!

The short version.

  • There is a compatibility problem between Magento Connect Manager and php greater than 5.3.x
  • Changes in PHP 5.4’s unpack function causes
    Magento Connect Manager script fails on the long path (more than 100 characters)
  • We are running Magento Community edition 1.8.0.0

The detail.

Oh dear! At the end of last week I managed to accidently removed our M2E Pro eBay integration by simply updating it using Magento Connect Manager. Magento Connect Manger is the inbuilt tool that you use from the Admin Panel in order to install, uninstall and update the plugin you have running on your Magento site.

To access it, log into your Magento Admin Panel and go to: System > Magento Connect > Magento Connect Manager

magento connect

You will then be asked to enter your Admin Panel username and password again before being taken to the Magento Connect screen where you will see a list of yoru installed plugins. I clicked on the “Check for Upgrades” button and this showed that a number of plugins had new stable versions released.

magento connect upgrades

In theory, you simply choose which version of the plugin you want to upgrade to and hit “Commit Changes”.  I thought this would be safe to do on the live site because it was a stable version and the update was being run through the Magento Connect Manager.

What actually happened was that the upgrade failed and removed the plugin access from the Admin Panel!

When Magento installs a plugin, it kicks the site into “Maintenance mode” so I was left with the front-end showing a “Maintenance mode” message and no access to the Admin Panel. See my post about how to recover your Magento site after a failed plugin upgrade.

I contacted M2E support about this issue and they were fantastic; responding in just a few hours. This is when I learned about the compatibility issue between the Magento Connect Manager and php greater than 5.3.x

This issue will also occur when you install a plugin. When I was implenting Mage Backups part of the plugin was showing an error and this was for the same reason – the plugin contained a file which had a path exceeding 100 characters.

The solution.

There are two options here:

  • Downgrade the php version (no thanks although I’d be interested to hear from anyone with experience of this); or
  • Manually install plugins using the cpanel.

Note that in the case of our M2E plugin, I had to manually removed the following files and directories from the server before doing a manual install:

You should remove these files/directories:

‘app/code/community/Ess/M2ePro’, ‘app/design/adminhtml/default/default/layout/M2ePro.xml’, ‘app/design/adminhtml/default/default/template/M2ePro’, ‘app/etc/modules/Ess_M2ePro.xml’, ‘js/M2ePro’, ‘skin/adminhtml/default/default/M2ePro’, ‘skin/adminhtml/default/enterprise/M2ePro’

Separate blog post to come on how to manually install a Magento plugin using cpanel. In summary, it’s more time consuming to add plugins to the server manually but much safer.

Top Tips when upgrading Magento plugins.

  • I strongly recommend that all Magneto plugins are tested on a separate Magento site before you go ahead and make changes to your live website – even upgrades!
  • Only ever install “stable” versions of plugins. You will often see that newer versions are available but only those listed as “stable” should be updated.
  • If you can, make any extension upgrades when you experience the least traffic to your site; for most people this will be in an evening.
  • If you have developer support with your Magento site, ensure they are available incase anything goes wrong.