Magento is one of the most powerful open source e-commerce platforms in use today. According to some reports it has the greatest market share of any Ecommerce system. Like any open source platform, Magento should be kept up to date for both security and performance reasons. However, the complex nature of Magento makes upgrading it to the latest version quite a chore. While this article won’t go into detail as to how to upgrade from Magento 1.x to Magento 2.x (there are lots of Magento 1 to Magento 2 upgrade resources out there to review), it will offer solutions for the most common bugs that occur after upgrading to the latest version (version 184.108.40.206 as of the publish date for this article).
Please note, this blog post is quite technical in nature and is for demonstration purposes only. We do not recommend having anyone but a skilled and experienced Magento development team (like us!) maintain and update your Magento site.
Nothing but Error Messages
Probably the most frustrating issue is a freshly-upgraded site that is showing ambiguous Magento error messages. It may reference some core files that will lead you down the rabbit hole of tracing down an error that doesn’t quite make sense. When this happens, it is a good practice to do the following:
- Manually clear the /var/cache/ directory
- Manually clear the /var/session/ directory
- Truncate all log_ tables
- Truncate report_event, report_compared_product_index, and report_viewed_product_index tables
- Run the following query:
UPDATE core_store SET store_id = 0 WHERE code=’admin’;
UPDATE core_store_group SET group_id = 0 WHERE name=’Default’;
UPDATE core_website SET website_id = 0 WHERE code=’admin’;
UPDATE customer_group SET customer_group_id = 0 WHERE customer_group_code=’NOT LOGGED IN’;
This may or may not work, but from personal experience this often solves the issue.
URLs suddenly have -1 or -2 appended to them
This is another bizarre phenomenon that has been observed after an upgrade. To fix this, truncate the core_url_rewrite table and then reindex the URLs.
“Class ‘Mage_Googlecheckout_Helper_Data’ not found”
This is observed very often in the Magento admin upon upgrading to 1.9. Fortunately it is a straightforward fix. Simply go to the directory magento-install-dir/app/code/core/Mage/GoogleCheckout/etc/ and remove all files except for config.xml. At this point you should be able to log back into the admin without any issues.
Checkout Process is Stuck at Review Step
If the site is seemingly functioning perfectly except for the final stage in the checkout process where the Place Order button simply does not work. This is usually a relatively quick fix. In the file /app/design/frontend/your_theme/template_checkout/onepage/review/info.php and replace
Returning Customers Cannot Login
If returning customers cannot login, the problem is usually related to the form_key hidden field not present in the login form. To correct this, add the following to all login forms on the site:
<input type="hidden" name="form_key" value="<?php echo Mage::getSingleton('core/session')->getFormKey(); ?>" />
Customers are not Receiving Order Confirmation Emails
Unlike some earlier versions of Magento version 1.9 sends out emails via the native Magento cron process as opposed to sending them out “real time” when an order is placed. If it seems like emails have suddenly stopped working, verify the cron settings to make sure it is running properly.
While this is by no means a comprehensive guide to upgrading Magento to the latest version, it should help those who are dealing with the more common post-upgrade issues. To reiterate, the information contained above is for demonstration purposes, or to assist a skilled Magento web developer, and is not intended as a guide for our clients or other non-professional web developers. Please contact us if you are interested in our services to help build or maintain a Magento website for you.