Skip to content

Shortcodes: remove aws domain from Mailchimp shortcode.#7989

Merged
dereksmart merged 4 commits intomasterfrom
fix/mailchimp-shortcode-7945
Oct 18, 2017
Merged

Shortcodes: remove aws domain from Mailchimp shortcode.#7989
dereksmart merged 4 commits intomasterfrom
fix/mailchimp-shortcode-7945

Conversation

@jeherve
Copy link
Copy Markdown
Member

@jeherve jeherve commented Oct 13, 2017

Fixes #7945

To test, create a Maichimp form as explained here:
https://en.support.wordpress.com/mailchimp/

Then try to embed it into one of your posts or pages, when logged in as an editor. You should see the form transform into a shortcode on save. Make sure
the form is displayed properly on the site.

Proposed changelog entry for your changes:

  • Maichimp: make sure subscription forms can still be embedded in posts and pages.

Fixes #7945

To test, create a Maichimp form as explained here:
https://en.support.wordpress.com/mailchimp/

Then try to embed it into one of your posts or pages, when logged in as an editor. You should see the form transform into a shortcode on save. Make sure
the form is displayed properly on the site.
@jeherve jeherve added [Feature] Shortcodes / Embeds [Pri] High [Status] Needs Review This PR is ready for review. Bug When a feature is broken and / or not performing as intended labels Oct 13, 2017
@jeherve jeherve self-assigned this Oct 13, 2017
@jeherve jeherve requested a review from a team as a code owner October 13, 2017 20:01
Fixes #7960
Fixes #7990

- The widget now calls the shortcode file even when the shortcodes are not active, so you do not need to activate the shortcode module for this to work.
- On save, the widget uses the reversal function provided in the shortcode to save a valid shortcode.
- That shortcode is then displayed in the widget, as before.
@dereksmart
Copy link
Copy Markdown
Contributor

This is failing a mail chimp test

1) WP_Test_Jetpack_Shortcodes_MailChimp::test_shortcodes_mailchimp_form
Failed asserting that '
<script type="text/javascript" data-dojo-config="usePlainJson: true, isDebug: false">jQuery.getScript( "//downloads.mailchimp.com/js/signup-forms/popup/embed.js", function( data, textStatus, jqxhr ) { require(["mojo/signup-forms/Loader"], function(L) { L.start({"baseUrl":"mc.us11.list-manage.com","uuid":"1ca7856462585a934b8674c71","lid":"2d24f1898b"}) }); } );</script>
' contains "<script type="text/javascript" data-dojo-config="usePlainJson: true, isDebug: false">jQuery.getScript( "//s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js", function( data, textStatus, jqxhr ) { require(["mojo/signup-forms/Loader"], function(L) { L.start({"baseUrl":"mc.us11.list-manage.com","uuid":"1ca7856462585a934b8674c71","lid":"2d24f1898b"}) }); } );</script>".
/tmp/wordpress-master/src/wp-content/plugins/jetpack/tests/php/modules/shortcodes/test_class.mailchimp.php:40

@jeherve
Copy link
Copy Markdown
Member Author

jeherve commented Oct 17, 2017

I fixed the test (I didn't do we had one, I should have checked!).

Copy link
Copy Markdown
Contributor

@zinigor zinigor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm that the code works - the code gets converted into a shortcode and displayed in the page as the properly formed embed. I'm having problems getting it to actually work, but I think it's related to my dev site problems.

@zinigor zinigor added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review This PR is ready for review. labels Oct 18, 2017
Mailchimp: save a shortcode when pasting a form code in the widget
@dereksmart dereksmart merged commit dea3bff into master Oct 18, 2017
@dereksmart dereksmart deleted the fix/mailchimp-shortcode-7945 branch October 18, 2017 18:31
@dereksmart dereksmart removed the [Status] Ready to Merge Go ahead, you can push that green button! label Oct 18, 2017
jeherve added a commit that referenced this pull request Oct 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug When a feature is broken and / or not performing as intended [Feature] Shortcodes / Embeds [Pri] High

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants