Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MailChimp Widget: Can't Convert Updated Popup Code #10104

Closed
druesome opened this issue Sep 6, 2018 · 4 comments · Fixed by #10105
Closed

MailChimp Widget: Can't Convert Updated Popup Code #10104

druesome opened this issue Sep 6, 2018 · 4 comments · Fixed by #10105
Assignees
Labels
[Feature] Shortcodes / Embeds [Pri] High [Type] Bug When a feature is broken and / or not performing as intended
Milestone

Comments

@druesome
Copy link
Contributor

druesome commented Sep 6, 2018

Related to #7945, Mailchimp changed their popup Javascript code again, and this causes the Mailchimp widget to not convert it correctly into the proper shortcode.

Previously, it looked like:

<script type="text/javascript" src="//downloads.mailchimp.com/js/signup-forms/popup/embed.js" data-dojo-config="usePlainJson: true, isDebug: false"></script><script type="text/javascript">require(["mojo/signup-forms/Loader"], function(L) { L.start({"baseUrl":"mc.us8.list-manage.com","uuid":"be06c2a596db91bfe4099fde8","lid":"b47399ad05"}) })</script>

Now, it looks like:

<script type="text/javascript" src="//downloads.mailchimp.com/js/signup-forms/popup/unique-methods/embed.js" data-dojo-config="usePlainJson: true, isDebug: false"></script><script type="text/javascript">window.dojoRequire(["mojo/signup-forms/Loader"], function(L) { L.start({"baseUrl":"mc.us8.list-manage.com","uuid":"be06c2a596db91bfe4099fde8","lid":"08cf5fa008","uniqueMethods":true}) })</script>

Saving the the above code doesn't convert into the shortcode, or result in the popup showing up on the site.

Note that the src value has changed with the additional /unique-methods/ subfolder, require was changed to window.dojoRequire and uniqueMethods":true was added at the end. A workaround back then was to simply change the src URL, but this time it doesn't work. Manually creating the shortcode with the baseURL, uuid and lid values still works, though.

An update on this widget would be fantastic. Thank you in advance!

@druesome druesome changed the title Mailchimp Widget Has Stopped Working After Popup Code Update Mailchimp Widget Can't Convert Updated Popup Code Sep 6, 2018
@jeherve jeherve added [Type] Bug When a feature is broken and / or not performing as intended [Feature] Shortcodes / Embeds [Pri] High labels Sep 6, 2018
@jeherve jeherve added this to the 6.6 milestone Sep 6, 2018
jeherve added a commit that referenced this issue Sep 6, 2018
Fixes #10104

Mailchimp updated their newsletter embed code, and the old one does not work anymore.
This change matches the new format, and updates our test accordingly.

Note that this also reverts the changes introduced in #8547, since they do not appear necessary anymore. Mailchimp fixed that issue on their end.
@jeherve jeherve self-assigned this Sep 6, 2018
@BrookeDot BrookeDot changed the title Mailchimp Widget Can't Convert Updated Popup Code MailChimp Widget: Can't Convert Updated Popup Code Sep 8, 2018
@BrookeDot
Copy link
Contributor

Thanks for your work on this @jeherve we also have a report of this on WP.com so commenting to make sure this fix gets backported :)
https://en.forums.wordpress.com/topic/mailchimp-html-snippet-for-subscribe-popup-is-being-stripped

@tanjoymor
Copy link

Some additional testing information that might be helpful on this issue.

Tested on a WordPress.com site with a Premium Plan and custom domain.

The before code looked the same as referenced above.
But the after code looked like:

<a href="//downloads.mailchimp.com/js/signup-forms/popup/unique-methods/embed.js">//downloads.mailchimp.com/js/signup-forms/popup/unique-methods/embed.js</a>window.dojoRequire(["mojo/signup-forms/Loader"], function(L) { L.start({"baseUrl":"mc.us16.list-manage.com","uuid":"7fd6eb5d6e7da5b3c14b87112","lid":"cbea7a4be4","uniqueMethods":true}) })

Based on the suggested work-around of:

[mailchimp_subscriber_popup baseUrl='$baseURL' uuid='$uuid' lid='$lid' usePlainJson='true' isDebug='false']

It was tested and worked on a couple of sites formatted as above, but didn't work on another site.

Further testing resulted in it working when the single quotes were replaced with double quotes and it has worked formatted like this:

[mailchimp_subscriber_popup baseUrl="$baseURL" uuid="$uuid" lid="$lid" usePlainJson="true" isDebug="false"]

Wasn't sure if this could be useful, so wanted to share. :-)

@tmmbecker
Copy link

reported in #1413476-zen

jeherve added a commit that referenced this issue Sep 20, 2018
Fixes #10104

Mailchimp updated their newsletter embed code, and the old one does not work anymore.
This change matches the new format, and updates our test accordingly.

Note that this also reverts the changes introduced in #8547, since they do not appear necessary anymore. Mailchimp fixed that issue on their end.
@edwinho89
Copy link

Reported on #1432034-zen as well.

kraftbj pushed a commit that referenced this issue Sep 21, 2018
* Shortcodes: update Mailchimp shortcode to match new format.

Fixes #10104

Mailchimp updated their newsletter embed code, and the old one does not work anymore.
This change matches the new format, and updates our test accordingly.

Note that this also reverts the changes introduced in #8547, since they do not appear necessary anymore. Mailchimp fixed that issue on their end.

* Update testing list to include steps for #10105
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Shortcodes / Embeds [Pri] High [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants