Broken Style after update to 7.2.1

Your software
My Mautic version is: 7.2.1
My PHP version is: PHP 8.5.12
My Database type and version is: mysql Ver 15.1 Distrib 10.11.14-MariaDB
I installed Mautic via: Composer

Your problem
My problem is:
I have a server running mautic-7.1.3. Today I ran an update to mautic7.2.1 and I noticed some issues with the layout.
On the “contacts” section. the “filter” search bar seems to be floating and when you start typing it takes the whole hight of the page.

The buttons, also seem to be without format.

When I ran the update, I had some errors here @php bin/console mautic:assets:generate
like these

```

[WARNING] Some commands could not be registered:

In AbstractCommonModel.php line 28:

Mautic\CoreBundle\Model\AbstractCommonModel::__construct(): Argument #1 ($em) must be of type Doctrine\ORM\EntityManagerInterface, Symfony\Component\HttpFoundation\RequestStack given, called in /srv/mautic/var/cache/prod/ContainerHCQH4zi/AppKernelProdContainer.php on line 282
1

In AbstractCommonModel.php line 28:

Mautic\CoreBundle\Model\AbstractCommonModel::__construct(): Argument #1 ($em) must be of type Doctrine\ORM\EntityManagerInterface, Symfony\Component\HttpFoundation\RequestStack given, called in /srv/mautic/var/cache/prod/ContainerHCQH4zi/AppKernelProdContainer.php on line 282
1
```

So to fix it, I had to ran this command rm -rf var/cache/* and then ran again composer run-script post-update-cmd and this time it worked.
Is this layout problem and issue with the update? or is there anything else I need to do to fix it?
I ran this command php bin/console cache:clear a couple times at the end, but still the site looks kind of broken.

Thanks

Hi

Thanks for the detailed information. This does not look like a CSS layout change in Mautic 7.2.1 itself. The important part is the error from mautic:assets:generate:

AbstractCommonModel::__construct():
Argument #1 ($em) must be of type EntityManagerInterface,
RequestStack given

This usually indicates that the production cache contains an outdated or partially rebuilt Symfony container after the update. As a result, asset generation may fail and the browser receives missing or incomplete CSS/JavaScript files.

From the Mautic project directory, please run the update commands as the same user that owns the Mautic files:

cd /srv/mautic

composer install --no-dev --optimize-autoloader

rm -rf var/cache/prod/* var/cache/dev/*

php bin/console cache:clear --env=prod
composer run-script post-update-cmd
php bin/console mautic:assets:generate

If PHP-FPM or OPcache is enabled, restart the corresponding PHP-FPM service afterwards. Also verify that the web server points to the correct Composer web root, normally:

/srv/mautic/docroot

Please check the browser Network tab for CSS and JavaScript requests. If they return 404, the problem is most likely the web-root configuration or missing generated assets. If they return 200 but the style is still broken, clear the browser cache and confirm that the files under docroot/media/css and docroot/media/js were regenerated.

The cache error should be resolved before investigating the visual layout further. You should not need to reinstall the database or recreate the installation.

Updating to 7.2.2 seems to have fixed the issue, for whatever reason. But i’ll keep your commands in mind for future updates, thank you!

Sorry to bother you again. I wanted to know if, for your campaign builder in M7.2.2, does your “send an email” window look like this, where there is no “yes” option for Send to unsubscribed contacts?

There’s a few regulatory emails that we send out. The documentation doesn’t show this change yet.

If yours isn’t missing the yes, then maybe our mautic version is still a little messed up.

Hi,

It took me a while to figure it out, but to toggle that option, you actually need to use the switch in the email editor, under the Advanced tab. There, you’ll see the “Send to unsubscribed contacts” option :slight_smile:

So the email should be marked as this?

Even though it will continue to say no in the campaign? This is normal?

This is not normal, it should say “Yes” in the campaign action.

Did you test the campaign and see if indeed is not sending to the unsubscribers?

When you selected Yes in the Advanced tab of the email, did it trigger a confirmation dialog? Do you have access to the database? maybe you can look and see if the email got send_to_dnc updated to 1.

I cleared the mautic cache once more in the terminal, and toggled the “Send to unsubscribed contacts” on and off while looking at a campaign, and now it’s changing in the campaign builder:

image

I also tested the email behaviour of both “Yes” and “No” and both are working as intended now. Thank you for your assistance!