I wrote a Plugin that sends emails on a form post, but it’s not working when changed to english (standard language is german). There is no error message, i just get skipped to the page and it seems to not execute the plugin in this case. Here is the plugin index.php:
load([
'****\\bestellungen\\mailer' => __DIR__ .'/src/Mailer.php'
]);
Kirby::plugin('****/bestellungen', [
'snippets' => [
'bestellungen/form' => __DIR__ . '/snippets/form.php'
],
'routes' => [
[
'pattern' => 'service/order',
'action' => function() { return ****\Bestellungen\Mailer::recipeOrder(); },
'method' => 'POST'
]
]
]);
The german page is /service/order, the english page is /en/service/order. This seems to break the routes. Any ideas?