i’m using the following plugin and it works in kirby 3.1.1, but not on 3.2.5
<?php
use \DrewM\MailChimp\MailChimp;
require('vendor/autoload.php');
Kirby::plugin('trust/apis', [
'routes' => [
[
'pattern' => 'mc-nws',
'action' => function () {
$mc_data = r::data();
// mailchimp api
$mc_apikey = page('about')->api_key();
$mc_listid = page('about')->api_id();
$mc = new MailChimp($mc_apikey);
$response = $mc->post('lists/' . $mc_listid . '/members', [
'email_address' => $mc_data['email'],
'status' => 'pending',
'double_optin' => false,
'update_existing' => true,
'send_welcome' => false
]);
return response::json($response);
},
'method' => 'POST'
]
]);
?>
after the xhr call in the app frontend, i just get a 404 not found
response.
i tried both on localhost and on a vps, same result. i wonder if kirby changed something in its internals meanwhile? or i have overlooked something.