Fixing Ebizmarts MageMonkey Magento Update Issue

Published by John on November 3, 2015 Under Magento

With the recent SUPEE-6788 Magento patch, I have been upgrading several Magento modules to make sure they use the newer method of declaring admin routes. One of my sites, which was fully updated last week, showed a new Ebizmarts_MageMonkey update to 1.2.1, however upon upgrading it, I was left with a broken Magento site.

If you haven’t used it MageMonkey is an extension that integrates services by Mailchimp/Mandrill, such as transactional emails, abandoned carts, Mailchimp mailing lists, and other cool features. I have found that Mandrill does a good job of improving email deliverability, so typically recommend using it for order emails.

Typically, this plugin has worked well, but this time when I upgraded, I got the following error:

Exception during cache and session cleaning: Error in file: “/public_html/app/code/community/Ebizmarts/AbandonedCart/sql/ebizmarts_abandonedcart_setup/mysql4-upgrade-1.1.35-1.2.0.php” – SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘ebizmarts_abandonedcart/email_order_items’ for key ‘UNQ_PERMISSION_BLOCK_BLOCK_NAME’, query was: INSERT INTO `permission_block` (`block_name`,`is_allowed`) VALUES (?, ?)

Following this, the website would no longer load and showed a 503 error message. I do not believe anything was getting logged in the system.log and it did not appear to show the normal Magento exception message.

Fixing Magemonkey Update Issue

First, make a backup of your database…you should of done this already prior to updating, but do it again now too.

Login to your MYSQL database and look at the rows in the table that are causing a problem:

mysql> select * from permission_block where permission_block.block_name like '%ebiz%';
+----------+------------------------------------------------+------------+
| block_id | block_name                                     | is_allowed |
+----------+------------------------------------------------+------------+
|       44 | ebizmarts_abandonedcart/email_order_items      |          1 |
|       45 | ebizmarts_autoresponder/email_backtostock_item |          1 |
|       46 | ebizmarts_autoresponder/email_related_items    |          1 |
|       47 | ebizmarts_autoresponder/email_review_items     |          1 |
|       48 | ebizmarts_autoresponder/email_wishlist_items   |          1 |
+----------+------------------------------------------------+------------+
5 rows in set (0.00 sec)

Next, delete these rows from the table:

mysql> delete from permission_block where permission_block.block_name like '%ebiz%' limit 5;

Now re-run the upgrade, which should no longer throw the above error. Login to the database again and verify the settings are back and have the correct value.

mysql> select * from permission_block where permission_block.block_name like '%ebiz%';
+----------+------------------------------------------------+------------+
| block_id | block_name                                     | is_allowed |
+----------+------------------------------------------------+------------+
|       44 | ebizmarts_abandonedcart/email_order_items      |          1 |
|       45 | ebizmarts_autoresponder/email_backtostock_item |          1 |
|       46 | ebizmarts_autoresponder/email_related_items    |          1 |
|       47 | ebizmarts_autoresponder/email_review_items     |          1 |
|       48 | ebizmarts_autoresponder/email_wishlist_items   |          1 |
+----------+------------------------------------------------+------------+
5 rows in set (0.00 sec)

If you run into issues, revert the database from the backup.


No Comments |

Add a Comment