Hi there,

I'm using mailchimp 7.x-2.9 on drupal 7.22, and whilst creating a malichimp campaign I cannot use the templates which I've saved on my mailchimp account, when I click on on the templates dropdown list there is no templates available to select, why is this and how can I overcome this?

thanks for your help guys

Comments

levelos’s picture

Priority: Critical » Normal
Status: Active » Fixed

Sorry, but this does not qualify as critical. Certain template types have always been excluded due to their structure and complexity. You could also try updating, you're several versions behind.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

McNott’s picture

Version: 7.x-2.9 » 7.x-2.12
Status: Closed (fixed) » Closed (won't fix)

I have the same issues cant import or sync the campaign created in mailchimp into drupal and mailchimp is not picking up the feed from the blog. Any thoughts?

pratip.ghosh’s picture

Issue summary: View changes
Status: Closed (won't fix) » Active

I dont think this issue is closed. I am using the latest version of Mailchimp (7.x-2.12). I have created two basic templates in my Mailchimp account. But its not getting populated. The "templates" function returns noting for "user" index. If you think its working please provide a sample code snippet. Mine is like

$q = mailchimp_get_api_object();
$q->templates(array('user'=>true, 'gallery'=>true)); // returns blank for 'user' index in the array
pratip.ghosh’s picture

Anyone facing this issue can try with their latest stable release : 7.x-3.0. However, there's still some bugs and scope of development that I found in this version. Also, if you are building a template from the basic templates in the mailchimp control panel, then for reasons unknown this will not show in the template listing while building a campaign. So try building it from a pre-defined theme.

[N.B.] - The latest version does not support backporting as per their documentation. You have to unistall your old version and install this freshly.

Thanks,

dkmn’s picture

I seem to be having this with 7.x-3.1, the 2.0.5 Mailchimp PHP Library, and core 7.28.
API calls do appear to fire, lists and campaigns sync, but I still do not see templates I add on the Mailchimp site get listed in the select box for new campaign creation (or campaign editing) on the Drupal module side.

Interestingly, if I go to Mailchimp (the web panel) and edit the created campaign, manually set one of my own templates, then it shows blank in the Drupal interface, but a preview shows the correct (custom) template.

There seems to be an issue retrieving, interpreting, or displaying the list of templates...

dkmn’s picture

Same with 2.0.4 and a fresh install (ie. no prior Mailchimp module).

dkmn’s picture

This seems to be due to trying to use user templates created with the drag-and-drop editor (seems like a reasonable use case).
If I make the following patch for troubleshooting, explicitly telling it to "include_drag_and_drop" in the API call to list templates, then
I see my templates nicely, but when I select them I get template parse errors from mailchimp_campaign.admin.inc

Am I missing something obvious here? It seems that one of Mailchimp's big claims to fame is the drag-and-drop editor (and the
associated ease of use). And a big benefit to the Mailchimp Drupal module is the ability to link campaigns to Drupal site data.
It would seem reasonable to use these together...?
Is any of this fixed by regressing upstream to an earlier commit, including the 7.x-2.x branch?

Thanks for any thoughts,
David

Troubleshooting patch follows (fixes this issue, but begets downstream errors)
-----

diff --git a/docroot/sites/all/modules/mailchimp/modules/mailchimp_campaign/mailchimp_campaign.module b/docroot/sites/all/modules/mailchimp/modules/mailchimp_campaign/mailchimp_campaign.module
index 6941ab2..85027fb 100644
--- a/docroot/sites/all/modules/mailchimp/modules/mailchimp_campaign/mailchimp_campaign.module
+++ b/docroot/sites/all/modules/mailchimp/modules/mailchimp_campaign/mailchimp_campaign.module
@@ -452,7 +452,10 @@ function mailchimp_campaign_list_templates($reset = FALSE) {
'base' => 1,
'gallery' => 1,
);
- $response = $mcapi->templates->getList($template_types);
+ $template_filters = array(
+ 'include_drag_and_drop' => 1,
+ );
+ $response = $mcapi->templates->getList($template_types, $template_filters);
foreach ($template_types as $type => $chosen) {
if ($chosen) {
$all_templates[$type] = array();

jpamental’s picture

This was the tip I've been missing! I had been creating templates using their drag/drop starting points and none of those templates ever showed up. But as soon as I created one and uploaded it (in Mailchimp's interface), that template was immediately visible in the Drupal module interface. Will be testing further but that seemed to be the differentiating factor.

Maybe that just needs to be documented better!

hbblogger’s picture

I installed Mailchimp today and have the same issue. The template that I have put together on Mailchimp does not appear on the list in Drupal.

tr.renne’s picture

I've got the same problem. My newly created templates don't appear in Drupal.

andyg5000’s picture

Version: 7.x-2.12 » 7.x-3.x-dev
Component: General » Documentation
Assigned: faisal_1 » Unassigned
Category: Bug report » Task

Thanks to @dkmn I was able to get templates to show up by creating them in the "code your own" section of Mailchimp. Since I assume this is expected functionality of this module, I'm setting this to a documentation task for the latest release.

trumanru’s picture

Title: Mailchimp campaign not importing templates » Mailchimp campaign not importing templates created by drag'n'drop
Component: Documentation » General
Category: Task » Feature request

As we see in #8, it's a code flaw.

Developers of this module don't use the variable $template_filters in $mcapi->templates->getList() method and can't parse templates built by drag'n drop template creation function of MailChimp.

I'm sure this is a feature request because the module don't support drag'n'drop MailChimp templates for now.

ruscoe’s picture

Status: Active » Closed (won't fix)

We're going to be ending support for the 7.x-3.x branch due to the upcoming deprecation of the v2.0 MailChimp API. If you're still interested in this feature, please feel free to reopen for the 7.x-4.x branch.

trumanru’s picture

Title: Mailchimp campaign not importing templates created by drag'n'drop » Mailchimp campaign doesn't import templates created by drag'n'drop
Version: 7.x-3.x-dev » 7.x-4.x-dev
Status: Closed (won't fix) » Postponed (maintainer needs more info)

I think this is an important feature.

The future task is a test of this function in 7.x-4.x branch of this module to distinguish is it works or not with the new Mailchimp API.

Greg Boggs’s picture

Status: Postponed (maintainer needs more info) » Active
hhvardan’s picture

Currently it is not possible to use drag and drop templates
You need to export the created template and import it as a "Code Your Own" template.
and add the merge values which will be replaced by node content.
The syntax for this merge values are mc:edit="field_body" ...
Please see this video for details https://vimeo.com/161296515

samuel.mortenson’s picture

Status: Active » Closed (won't fix)

We’re in maintenance-mode for the Drupal 7 releases of Mailchimp, so only bug fixes can be committed going forward. Any new features should be developed for the Drupal 8 releases of Mailchimp. Thanks!