MageMonkey‎ > ‎

Troubleshooting

Footer subscription not working


If you have installed version 1.1.33 and footer subscription is not working you need to do the changes stated on the following post: http://ebizmarts.com/forums/topics/view/16973


The status of the subscribers it's not updated after I subscribe/unsubscribe


To identify the error do the following:

1- If you have any login page in the frontend disable it
2- Instead of using your custom template change to the default Magento template (then you can restore it again)
3- Check in your MailChimp custom fields if you have some field as required, uncheck and make it NOT required
4- Save the configuration in System -> Configuration MageMonkey again and be sure that you dont receive any kind of error (principal cause this doesn't work)
5- Go to your MailChimp account to the default list and in List Tools -> Webhooks section check that the url of your site be there, it has to look something like this one: http://[url_of_your_site]/index.php/monkey/webhook/index/wkey/[some_encriped_numbers]/
6- In the same section check if below under the title "What type of updates should we send?" you have all the checkboxes checked.

If you complete all this steps without any problem, remove the cache of your Magento and try again and check in Magento:
*1- Newsletter -> Newsleter Subscribers the status of your user.
*2- Then go to your MailChimp account inside your MailChimp list and see if the user it's there and subscribed.

Also you should receive an email confirmation that you are subscribed (just if you have double opt-in enabled)
Wait until the user it's in both places.
Once the user be subscribed in your MailChimp list refresh the customer account section in your Magento frontend, you have to see the checkbox ticked now.
Then and just if the last step it's correct uncheck the checkbox from your default list under the customer account section in your Magento frontend.

Check again the steps *1 and *2 if the user change the status to unsubscribed in both places.
Now the checkbox in the customer account section in your Magento frontend must be unchecked and you should receive an email confirmation that you are unsubscribed now.

And finally and just if the last step it's correct check the checkbox from your default list under the customer account section in your Magento frontend.
Now the checkbox in the customer account section in your Magento frontend must be checked and you should receive an email confirmation that you are subscribed again (just if you have double opt-in enabled)

Check again the steps *1 and *2 if the user change the status to subscribed in both places.

Between every step check the logs if you have any error or notification that you consider important ([path_of_your_site]/var/log)


I receive an error when I save the configuration


if you are receiving an error like the next:

Could not add Webhook "http://your_site/index.php/monkey/webhook/index/wkey/encripted_code/" for list "your_list", error code 508, Unable to verify the URL is working, please double check and try again. HTTP Code: 404

This mean that we can't create the webhook url in your MailChimp account. This will prevent that any change in MailChimp be updated in Magento.

The main reason for this error it's that you have a login page in the frontend to identificate your customers.
If this it's your case, the mayor of this extension has url exceptions so you could add your webhook url in your extension configuration.

In order to get your webhook url you have to do the next simple step:

- Enable the logs in System -> Configuration -> Advanced -> Developer -> Log Settings and set up it in Yes.
- Edit the file app/code/community/Ebizmarts/MageMonkey/Model/Observer.php and add the next line: Mage::log($hookUrl); in the function saveConfig just below the variable name ($hookUrl) as in the image below:


- Open the system.log file saved in your_site_path/var/log folder.

You should see your webhook url here it should look like this:  http://your_site/index.php/monkey/webhook/index/wkey/encripted_code/

In order to test if it's working paste it in your browser on the address bar:

If you see a blank page this mean that the webhook arrives ok, so the problem it's other
If not you are going to see an html error like 404, 403, ...
This mean that something it's preventing this url be executed correctly


I'm using Double opt-in but I'm not receiving the Newsletter Confirmation email

This could be for several reasons, I will mention a few of them.

First of all check our logs(MageMonkey_ApiCall.log and Monkey.log) under your_site_path/var/log folder to see if there's any error in there.


Double check your List Name

Your list should not contain special chars like "#", otherwise MageMonkey won't execute the listSubscribe() method (you can double check and look for this in your MageMonkey_ApiCall.log)


Required Fields

The most common error it's this one:

Exception code: 250 ||| Exception message: [FIELD_NAME] must be provided - Please enter a value

If you have this error in your log your problem it's that you set up the [FIELD_NAME] field in your MailChimp account as required but you are sending this field with no value.

To fix this you have to go into your list and get into the List Fields And *|MERGE|* Tags section and uncheck the Required? column from this field.

If you have required fields in your List, they need to be present in all of your Newsletter Subscription forms in your Magento.

One good example, people often set as required "First Name" and "Last Name" in their list, and don't set a "Guest Firstname/Lastname" in MageMonkey configuration. So when visitors/customers subscribers to the default Newsletter box (located in left sidebar in Magento Default theme), there's no Firstname and Lastname in that subscription and subscription fails.


Checkout Subscriptions

If the error it's just in the checkout when your customers try to purchase an order possibly you should change your configuration for the option Subscribe on Checkout to Enabled - Force subscription.
Basically what's happening there it's that you are using a payment method like PayPal or Amazon Checkout which redirect to their own site to make the purchase so with the other options for Subscribe on Checkout which are displayed in the last step of the checkout it's never shown. The only solution it's forcing the subscription and in case the order be successful we subscribe the user.


I'm using Simple opt-in and I don't receive any email


If you want to receive the Newsletter success email after a user has been subscribed to MailChimp list you need to edit the file app/code/community/Ebizmarts/MageMonkey/Model/MCAPI.php line 1640

From: function listSubscribe($id, $email_address, $merge_vars=NULL, $email_type='html', $double_optin=true, $update_existing=false, $replace_interests=true, $send_welcome=false) { 
To: function listSubscribe($id, $email_address, $merge_vars=NULL, $email_type='html', $double_optin=true, $update_existing=false, $replace_interests=true, $send_welcome=true) {




How to remove the MAGE_CUSTOMER_GROUPS group from my website and emails?


This MailChimp group was used in older versions of our extension to sync the Magento Customer Groups with MailChimp. 
Actually we don't use it anymore instead we use a merge field named CGROUP so you can know which customer group the subscriber it's in Magento by this value.
Remove this field it's totally safe and it's not going to give you any problem.
To achieve this follow the next steps:

- Log in to your MailChimp account
- Go to your list/s and click on the Group tab
- You will see this group displayed like in the image below
- Click on the delete link in the right of the MAGE_CUSTOMER_GROUPS blue text
- Confirm writing the word "DELETE" and clicking on the Delete Group blue button

Mage_Customer_Group



I receive the error: Mage registry key "_singleton/monkey/observer" already exists"
If you are receiving this error it's because you installed our extension with compilation mode enabled.
You can find this option in your Magento Backend in System -> Tools -> Compilation.
If you still having access to your backend you can disabled from there.
In the most part of the cases you can't log into your Backend but don't panic there's others way to disable the compilation.

Additional methods to disable the compiler below:

- Edit the file index.php commenting the line include $compilerConfig;

Code:

$compilerConfig = MAGENTO_ROOT . '/includes/config.php';
if (file_exists($compilerConfig)) {
//
include $compilerConfig;
}

- Disable the compilation with SSH:

Open your terminal console and run this 2 scripts below:

Clear the cache
------------------
SSH:
find ./var/cache -type f -delete
FTP:
mrm -r ./var/cache ; mkdir ./var/cache

------------------
Disable/Clear Magento compilation
------------------
SSH:
php -f shell/compiler.php -- disable
php -f shell/compiler.php -- clear
FTP:
mv ./includes ./includes.unused

Important: If you have any other troubleshooting that it's not detailed here or in the FAQ page don't hesitate in post your issue in our forum.



WebHook

Couldn't add Webhook (site using Apache validation)

Webhook won't work if your site has Apache validation.
Since MailChimp, when you add the Webhook, tries to reach that url in your site. So, if it has Apache protection, MailChimp cannot access to it.
You will need to remove the Apache validation, and try again.
 What you can do to avoid indexing the site or to tell that your site is not really selling, is to show DEMO notice:

Config Section: System / Configuration / Design /
Display Demo Store Notice: Yes
Default Robots: NOINDEX, NOFOLLOW


Key invalid

If your webhook is invalid, you'll find an error logged in your /var/log/Monkey.log file, like so:

WebHook Key invalid! Key Request: ........

If your key has a "default" name at the end, like so:

WebHook Key invalid! Key Request: xxxyour_keyxxxdefault. My Key: xxxyour_keyxxx


Do the following:
  1. Go to your "MailChimp List / Settings / Webhooks". You'll find: http://www.yourdomain.com/monkey/webhook/index/wkey/xxxxxxxxxxxxxxxdefault/

  2. Remove that "default" string from the webhook URL.

  3. Within MageMonkey, save your configuration.
This should resolve the problem.





Mandrill ValidationError -1

If you're having this error in your log files when Mandrill tries to send an email:
[0] => stdClass Object
  (
    [status] => error
    [code] => -1
    [name] => ValidationError
    [message] => You must specify a key value
)

Please locate this file in your website:
File: lib/lib/Mandrill/API.php

And make the following change
Original code:
curl_setopt($curlSession, CURLOPT_POSTFIELDS, http_build_query($params));

Final code:
curl_setopt($curlSession, CURLOPT_POSTFIELDS, json_encode($params));