Search

Thanks Lewis, this it what came out, maybe it has something to do with the language? It also get some unicode characters wrong.

string(275) “my@address.com è già  iscritto alla lista My List. Clicca qui per aggiornare il tuo profilo."

What language? What fields are in your form and what are you entering exactly? It appears MailChimp is returning invalid XML.

I’m not sure if I understand your request correctly so please excuse me if you’ll have to ask again :-)

The form sends the email field and two hidden fields with some properties. The error message from mail chimp says, in Italian, that the address is already in the list.

If you want to take a look you can find the form at http://iltrico.webfactional.com/en/ (event.mailchimp.php is modified as you requested)

Thank you again for your help

I have contacted MailChimp about their invalid XML response and I am awaiting a response.

MailChimp updated to version 1.17 on 29th of September 2011

  • 1.17 - Fixed a bug where $output could be mixed (Thanks nitriques).

Just wondering if this extension works with Nick's form controls extension?

Has anyone ever tried it?

@Tintin81: Since nick's extension only prodives templates for rendering html, I am pretty sure it will. Just name your fields as they should.

@Tintin81, If you find that it does not conform to Symphony's error/success node structure please file a bug report on GitHub.

Hello,

I am getting a strange error when trying to submit an e-mail-address that's already on the list:

loadXML(): EntityRef: expecting ';' in Entity, line: 40

And line 40 reads like this:

 <error>john@doe.com is already subscribed to list Company Newsletter. <a href="http://domain.us2.list-manage1.com/subscribe/send-email?u=1dc64c5213a02d0f81fg3a3e9&id=08c9fg2h69&e=dGfsZWVtYV5uQHetYWlsFmNvbQ==">Click here to update your profile.</a></error>

What am I missing here? Or is this a bug?

P.S: Otherwise it works fine.

MailChimp updated to version 1.18 on 11th of December 2011

  • Fix bug to handle & from MailChimp in error messages.

@Tintin81, it's fixed.

@Lewis, wow great, works like a charm now. One of the most useful extensions for me, thanks a lot.

I'm having trouble implementing the ajax code for the mailchimp form. I have followed the instructions, included &lt;script src="/extensions/mailchimp/assets/subscribe.js">&lt;/script> and added:

$('#the-form').mailchimp({
                complete: completeCallback(data), // this is set to #the-form
                error: errorCallback(data) // data.error -> error message
             });

`

`/

to my page but I'm getting Uncaught ReferenceError: data is not defined

I'm probably doing something dumb, anyone got any suggestions?

What does your form look like?

Hi Lewis, the form looks like this:

<xsl:choose>
                            <xsl:when test="/data/events/mailchimp[@result = 'success'] ">
                                <h2>thank you</h2>
                                <p class="success">Check your e-mail to <strong>confirm your e-mail address</strong>.</p>
                            </xsl:when>
                            <xsl:otherwise>
                                <h2><xsl:value-of select="header"/></h2>
                                <xsl:copy-of select="text/*"/>
                                <xsl:if test="/data/events/mailchimp[@result = 'error'] ">
                                    <p class="error"><xsl:value-of select="/data/events/mailchimp/error" /></p>
                                </xsl:if>
                                <form id="the-form" method="post" action="" enctype="multipart/form-data">
                                    <div class="ctrlHolder">
                                        <label>First Name <small>(required)</small></label>
                                        <input type="text" name="merge[FNAME]" value="{/data/events/mailchimp/cookies/cookie[@handle = 'FNAME']}" />
                                    </div>
                                    <div class="ctrlHolder">
                                        <label>Last Name <small>(required)</small></label>
                                        <input type="text" name="merge[LNAME]" value="{/data/events/mailchimp/cookies/cookie[@handle = 'LNAME']}" />
                                    </div>
                                    <div class="ctrlHolder">
                                        <label>Email Address <small>(required)</small></label>
                                        <input type="text" name="email" value="{/data/events/mailchimp/cookies/cookie[@handle = 'email']}" />
                                    </div>
                                    <input id="submit" type="submit" name="action[signup]" value="Sign me up" />
                                </form>
                            </xsl:otherwise>
                        </xsl:choose>

On line 49 of /extensions/mailchimp/assets/subscribe.js add

alert(data);

What does it alert?

I put the alert(data) where you said but it does not get executed. The error is occurring in the call to mailchimp I think.

Hi Lewis,

Is it possible to have url redirect with mailchimp event?

I have tried adding

<input name="redirect" type="hidden" value="/thank-you-for-your-subscription/" />

but it doesn't work as expect. Is there something I am missing or is the solution a bit more involved?

Is it possible to have url redirect with mailchimp event?

It's not currently supported (I think I just overlooked it), but it is easy to implement. I will update it over the weekend.

Also, I'm sorry forgot about the JavaScript issue. I've been swamped at work. I will take a look at it over the weekend as well (I did not implement the AJAX portion so it may take me a little longer to figure it out). I will also ask @nitriques to take a look at it since he implemented it.

Thanks Lewis, that would be great!!

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details