Crash creating new email in v7

Your software
My Mautic version is: 7.2.1
My PHP version is: 8.4.27
My Database type and version is: Maria dB 11.4

Your problem
My problem is: When creating a new email and then hitting “Save,” it goes to a “500 Internal Server Error” page.

This was working. The only change that I can think of is the update to PHP 8.4.27 and my host disabled session.upload_progress.enabled for all servers.

These errors are showing in the log:

[2026-10-26T01:33:59.191146+00:00] app.CRITICAL: Uncaught PHP Exception TypeError: “Mautic\FormBundle\Controller\PublicController::previewAction(): Argument #5 ($id) must be of type int, string given, called in /[my site]/mautic/docroot/vendor/symfony/http-kernel/HttpKernel.php on line 183” at /[my site]/mautic/docroot/app/bundles/FormBundle/Controller/PublicController.php line 522 {“exception”:“[object] (TypeError(code: 0): Mautic\FormBundle\Controller\PublicController::previewAction(): Argument #5 ($id) must be of type int, string given, called in /[my site]/mautic/docroot/vendor/symfony/http-kernel/HttpKernel.php on line 183 at /[my site]/mautic/docroot/app/bundles/FormBundle/Controller/PublicController.php:522)”} {“hostname”:“vps.myserver.com”,“pid”:484497}
[2026-10-26T19:02:03.534634+00:00] app.CRITICAL: Uncaught PHP Exception Error: “Class “Symfony\Component\DomCrawler\Crawler” not found” at /[my site]/mautic/docroot/app/bundles/EmailBundle/Validator/ValidEmailLinksValidator.php line 49 {“exception”:“[object] (Error(code: 0): Class “Symfony\Component\DomCrawler\Crawler” not found at /[my site]/mautic/docroot/app/bundles/EmailBundle/Validator/ValidEmailLinksValidator.php:49)”} {“hostname”:“vps.myserver.com”,“pid”:547734}

Steps I have tried to fix the problem:

Cleared cache

Hi Adam
The two log entries appear to describe separate problems.

The session.upload_progress.enabled setting is unrelated to this email-save failure. It only controls PHP upload-progress tracking.

The direct cause of the 500 error is:

Class “Symfony\Component\DomCrawler\Crawler” not found

This means that the runtime Composer dependencies are incomplete. Mautic’s email link validator requires both symfony/dom-crawler and symfony/css-selector.

First verify the installation from the Mautic directory containing composer.json:

php -r 'require "vendor/autoload.php"; $crawler = new Symfony\Component\DomCrawler\Crawler("<a href=\"https://example.com\">x</a>"); echo $crawler->filter("a[href]")->count(), PHP_EOL;'

The expected output is 1.

If the packages are missing, back up composer.json and composer.lock, then install the runtime dependencies:

cp composer.json composer.json.before-dependency-fix
cp composer.lock composer.lock.before-dependency-fix

composer remove --dev symfony/dom-crawler --no-update
composer require symfony/dom-crawler:"~7.4.0" symfony/css-selector:"~7.4.0" --update-no-dev --no-scripts
composer dump-autoload --classmap-authoritative

After that, clear the Mautic cache and restart PHP-FPM and any long-running workers. If this is running in Docker, the change must be included in the image or persistent application volume; installing packages inside a temporary container will be lost after recreation.

The previewAction() error is a separate issue. It shows that a route parameter is arriving as a string while the controller expects an integer. Please check the exact request URL that produces this error and make sure that all Mautic files come from the same 7.2.1 release and that the application cache has been rebuilt.

This is not explained by session.upload_progress.enabled. If the previewAction() error remains after a clean, consistent deployment, it should be reported separately with the full request URL and stack trace.