Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I get a WSOD when I visit campaigns page. Proxy configuration is not taken into consideration. I've checked patch #9 from https://www.drupal.org/project/mailchimp/issues/2852755 but I don't understand why it does not use "http_client_config" variable.
I've fixed it with the following in mailchimp.module file :
$http_options = [
'timeout' => 60,
];
// Check if there is a proxy
if ($proxy_server = \Drupal\Core\Site\Settings::get('http_client_config')) {
$proxy_http = sprintf(
'tcp://%s',
preg_replace("(^https?://)", "", $proxy_server['proxy']['http'])
);
$proxy_https = sprintf(
'tcp://%s',
preg_replace("(^https?://)", "", $proxy_server['proxy']['http'])
);
$http_options += [
'proxy' => [
'http' => $proxy_http,
'https' => $proxy_https
]
];
}
$mailchimp = new $classname($api_key, 'apikey', $http_options);
Comment | File | Size | Author |
---|---|---|---|
#11 | http-client-proxy-2951089-11.patch | 508 bytes | stephen-cox |
#4 | mailchimp-proxy-2951089-4-d8.patch | 477 bytes | thomscode |
#2 | proxy_http_client_config-2951089-2.patch | 808 bytes | Guietc |
|
Issue fork mailchimp-2951089
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
Guietc CreditAttribution: Guietc commentedThanks @progzy for your issue. It works on 8.x-1.11 version.
I add the patch.
Comment #3
samuel.mortensonI think we should replicate how core uses this setting, see
\Drupal\Core\Http\ClientFactory::fromOptions
:The
tcp://
specific work in this patch is not standard behavior for this setting, but I think merging it into the Guzzle settings for Mailchimp objects makes sense, based on core.Comment #4
thomscode CreditAttribution: thomscode at Pacific Northwest National Laboratory commentedAdding a new patch that simply uses Drupal's proxy settings as they are. This is more in line with how Drupal's "Settings" class works per comment 3.
Comment #5
gcbComment #8
robertoperuzzoI'm testing the @thomscode patch #4. I created an "issue fork" and prepared a merge requester in GitLab in order to help the reviewers.
Comment #9
gcbComment #10
stephen-cox CreditAttribution: stephen-cox at Agile Collective commentedRe-rolled patch against latest 2.2.2 release.
Comment #11
stephen-cox CreditAttribution: stephen-cox at Agile Collective commentedPrevious patch didn't work. New patch re-rolled against latest 2.x branch.