MailChimp subscribe URL causes warnings on secure (HTTPS) sites
-
I added a MailChimp optin form to my HTTPS site with MAB. Unfortunately this causes a browser warning, since it creates a form element with action=”http://..” to the MailChimp list-manage page.
I sent a support ticket to MailChimp to see if I can tweak this in my list settings anywhere, so that the API returns an HTTPS endpoint for subscribe_url_long that MAB is using.
In the meantime, I hacked MAB to set the form-action-url to a protocol-less one by changing lib/classes/ProsulumMabAdmin.php:
$listData = $this->getMailChimpListSingle( $mab['optin']['mailchimp']['list'] ); // Added line, from https://coderwall.com/p/goabcq $listData['subscribe_url_long'] = preg_replace('#^[^:/.]*[:/]+#i', '//', $listData['subscribe_url_long']); $mab['optin']['mailchimp']['form-action-url'] = str_replace('subscribe', 'subscribe/post', $listData['subscribe_url_long']);I’ll post if I hear anything from MailChimp, but thought I should mention it here too in case this could be handled in the plugin in the meantime.
The topic ‘MailChimp subscribe URL causes warnings on secure (HTTPS) sites’ is closed to new replies.