API error after update to 2.16.0

Your software
My Mautic version after update is: 2.16.0
My Previous Mautic version : 2.15.3
My PHP version is: 7.2.24-0ubuntu0.18.04.3

Your problem
My problem is:
We have a server side app which uses Mautic API to send emails. It stopped working after updating Mautic.
Gives error 500 on “emails/{0}/contact/{1}/send” method call

These errors are showing in the log:
mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\ClassNotFoundException: “Attempted to load class “IntlExtension” from namespace “Twig\Extensions”. Did you forget a “use” statement for another namespace?” at /data/www/dev.ease-software.nl/mautic/plugins/MauticAdvancedTemplatesBundle/Helper/TemplateProcessor.php line 65 {“exception”:"[object] (Symfony\Component\Debug\Exception\ClassNotFoundException(code: 0): Attempted to load class “IntlExtension” from namespace “Twig\Extensions”.\nDid you forget a “use” statement for another namespace? at /data/www/dev.ease-software.nl/mautic/plugins/MauticAdvancedTemplatesBundle/Helper/TemplateProcessor.php:65)"}

Steps I have tried to fix the problem:
Clearing cache folder
Updating DB schema

looks like the problem is in PHP extension and not with mautic, please check if your server have php-intl extension installed and enabled.

you can check this by going in mautic settings > system info.

It is installed.

Okay,

Just to be sure can you please run composer install in your mautic root. this will ensure if there is any missing extension it’ll be installed. Mautic uses symfony/intl package to provide support for intl extension. so in case this extension is available with php but its symfony wrapper is missing it’ll be installed.

https://packagist.org/packages/symfony/intl basically this seems to be missing. Also you this problem is being caused by MauticAdvancedTemplatesBundle and as per https://github.com/Logicify/mautic-advanced-templates-bundle repository it is not tested with mautic 2.16.0 and php 7.2.

Just in case composer install doesn’t fix the issue please raise an issue on the repository link.

composer install
That helped. Thank you.

1 Like