Your software
My Mautic version is: 5.1.1
My PHP version is: 8.1.26
My Database type and version is: 10.11.9-MariaDB-0+deb12u1
Your problem
My problem is:
The Unsubscribe Link does not work. I can’t say since when, but it must be since an update. I don’t check this every time, I’m composing an email.
These errors are showing in the log:
mautic.CRITICAL: Uncaught PHP Exception Twig\Error\LoaderError: “Unable to find template “:divine-partnership:base.html.twig” (looked into: /var/www/clients/client1/web49/web/mautic/vendor/knplabs/knp-menu/src/Knp/Menu/Resources/views, /var/www/clients/client1/web49/web/mautic/vendor/symfony/twig-bridge/Resources/views/Form) in “@themes/divine-partnership/html/message.html.twig” at line 1.” at /var/www/clients/client1/web49/web/mautic/vendor/twig/twig/src/Loader/FilesystemLoader.php line 234 {“exception”:“[object] (Twig\Error\LoaderError(code: 0): Unable to find template ":divine-partnership:base.html.twig" (looked into: /var/www/clients/client1/web49/web/mautic/vendor/knplabs/knp-menu/src/Knp/Menu/Resources/views, /var/www/clients/client1/web49/web/mautic/vendor/symfony/twig-bridge/Resources/views/Form) in "@themes/divine-partnership/html/message.html.twig" at line 1. at /var/www/clients/client1/web49/web/mautic/vendor/twig/twig/src/Loader/FilesystemLoader.php:234)”} {“hostname”:“mars”,“pid”:112569}
The problem with this is, that the lookup path is wrong. Templates are not located under knblabs/knp-menu/src/Knp
How comes that Mautic looks there for the template.
Steps I have tried to fix the problem:
Deactivate Twig Plugin.
No success.
There is a message with this topic, but no solution.
The unsubscribe functionality is working correctly, and the issue you’re facing is not related to the update. I am 99.9% certain that the problem lies with your custom email theme.
Edit only the email.mjml.twig file. Delete the entire email template and paste your own. Don’t forget to validate your email code here.
After validation, copy the validated email code and paste it into the email.html.twig file.
(Optional) If you’d like, you can modify the thumbnail, composer.json, and config.json. These can also be updated later, once you’re sure your email is working fine.
Save the template and upload it to your Mautic instance.
Once you’ve done this, check if the error appears again. If you need further assistance, feel free to reach out to me on Mautic’s Slack
so kind.
I fixed it in the way, that I took another default email template and modified it via the template editor and the unsubscribe link works now.
It was for me the faster way, than checking what the problem with my custom footer was.