# Error 500 when opening contacts after usage of assets

**URL:** <https://forum.mautic.org/t/error-500-when-opening-contacts-after-usage-of-assets/38144>\
**Category:** Product Support\
**Created:** [April 23, 2026, 8:58am UTC](https://forum.mautic.org/t/error-500-when-opening-contacts-after-usage-of-assets/38144 "2026-04-23T08:58:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexrm1x](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/alexrm1x/32/2500_2.png) [@alexrm1x](https://forum.mautic.org/u/alexrm1x)\
**Post date:** [April 23, 2026, 8:58am UTC](https://forum.mautic.org/t/error-500-when-opening-contacts-after-usage-of-assets/38144/1 "2026-04-23T08:58:04Z")

</div>

My Mautic version is: 7.0.1  
My PHP version is: 8.4

Your problem  
Error 500 after usage of ASSETS.  
Usage of assets break opening contact properties afterwards.

Steps to reproduce:  
CREATE asset (either local or remote)  
SEND email to CONTACT including an asset link  
Open email from the contact mailbox (then clic on the asset link, no automation involved)  
Go to MAUTIC and open CONTACT properties - ERROR 500

(DELETING the asset solves the problem)

 ![mautic error 3](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/0/09f92b3adc9805e94e2c1b9d5b067a6b21893b36.jpeg)

 ![mautic error 2](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/6/6641d19938f146f21eb95f339aadfc16d8d48052.jpeg)

 ![mautic error 1](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/a/a2e6d4c470ae09c23ad48f458ec19173879bdf17.jpeg)

ERROR 500

---

<div class="post-metadata">

**Author:** ![marcus42](https://avatars.discourse-cdn.com/v4/letter/m/ac91a4/32.png) [@marcus42](https://forum.mautic.org/u/marcus42)\
**Post date:** [April 24, 2026, 10:25am UTC](https://forum.mautic.org/t/error-500-when-opening-contacts-after-usage-of-assets/38144/2 "2026-04-24T10:25:33Z")

</div>

What does your server’s logs saying?

---

<div class="post-metadata">

**Author:** ![ravi\_2002](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ravi_2002/32/13591_2.png) [@ravi\_2002](https://forum.mautic.org/u/ravi_2002)\
**Post date:** [April 24, 2026, 10:41am UTC](https://forum.mautic.org/t/error-500-when-opening-contacts-after-usage-of-assets/38144/3 "2026-04-24T10:41:14Z")

</div>

Yes I got a chance to look into it and in order to fix the bug modify ‘@MauticAsset/Asset/preview.html.twig’ to ‘@MauticAsset/Modules/preview.html.twig’ at AssetBundle/Resources/views/SubscribedEvents/Timeline/index.html.twig line no.3

---

<div class="post-metadata">

**Author:** ![ejobs](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ejobs/32/14791_2.png) [@ejobs](https://forum.mautic.org/u/ejobs)\
**Post date:** [April 24, 2026, 1:01pm UTC](https://forum.mautic.org/t/error-500-when-opening-contacts-after-usage-of-assets/38144/4 "2026-04-24T13:01:09Z")

</div>

I can confirm both the problem and the solution (v7.1.0)

---

<div class="post-metadata">

**Author:** ![alexrm1x](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/alexrm1x/32/2500_2.png) [@alexrm1x](https://forum.mautic.org/u/alexrm1x)\
**Post date:** [May 4, 2026, 4:18pm UTC](https://forum.mautic.org/t/error-500-when-opening-contacts-after-usage-of-assets/38144/5 "2026-05-04T16:18:18Z")

</div>

mautic.noname\_server.es@www:~/mautic/var/logs$ tail -f /home/mautic.noname\_server.es/mautic/var/logs/mautic\_prod-2026-05-04.php  
[2026-05-04T15:51:50.369027+00:00] mautic.ERROR: STAT UPDATE: cURL error 6: Could not resolve host: [updates.mautic.org](http://updates.mautic.org) (see [libcurl - Error Codes](https://curl.haxx.se/libcurl/c/libcurl-errors.html)) for [https://updates.mautic.org/stats/send](https://updates.mautic.org/stats/send) {“hostname”:“www.noname\_domain.es”,“pid”:3808713}  
[2026-05-04T15:51:50.413784+00:00] mautic.ERROR: UPDATE CHECK: cURL error 6: Could not resolve host: [api.github.com](http://api.github.com) (see [libcurl - Error Codes](https://curl.haxx.se/libcurl/c/libcurl-errors.html)) for [https://api.github.com/repos/mautic/mautic/releases](https://api.github.com/repos/mautic/mautic/releases) {“hostname”:“www.noname\_domain.es”,“pid”:3808713}  
[2026-05-04T16:01:40.078483+00:00] mautic.CRITICAL: Uncaught PHP Exception Twig\Error\LoaderError: “Unable to find template “@MauticAsset/Asset/preview.html.twig” (looked into: /home/mautic.noname\_server.es/mautic/docroot/app/bundles/AssetBundle/Resources/views) in “@MauticAsset/SubscribedEvents/Timeline/index.html.twig” at line 3.” at /home/mautic.noname\_server.es/mautic/docroot/app/bundles/AssetBundle/Resources/views/SubscribedEvents/Timeline/index.html.twig line 3 {“exception”:“[object] (Twig\Error\LoaderError(code: 0): Unable to find template “@MauticAsset/Asset/preview.html.twig” (looked into: /home/mautic.noname\_server.es/mautic/docroot/app/bundles/AssetBundle/Resources/views) in “@MauticAsset/SubscribedEvents/Timeline/index.html.twig” at line 3. at /home/mautic.noname\_server.es/mautic/docroot/app/bundles/AssetBundle/Resources/views/SubscribedEvents/Timeline/index.html.twig:3)”} {“hostname”:“www.noname\_domain.es”,“pid”:4062560}  
[2026-05-04T16:16:16.661201+00:00] mautic.CRITICAL: Uncaught PHP Exception Twig\Error\LoaderError: “Unable to find template “@MauticAsset/Asset/preview.html.twig” (looked into: /home/mautic.noname\_server.es/mautic/docroot/app/bundles/AssetBundle/Resources/views) in “@MauticAsset/SubscribedEvents/Timeline/index.html.twig” at line 3.” at /home/mautic.noname\_server.es/mautic/docroot/app/bundles/AssetBundle/Resources/views/SubscribedEvents/Timeline/index.html.twig line 3 {“exception”:“[object] (Twig\Error\LoaderError(code: 0): Unable to find template “@MauticAsset/Asset/preview.html.twig” (looked into: /home/mautic.noname\_server.es/mautic/docroot/app/bundles/AssetBundle/Resources/views) in “@MauticAsset/SubscribedEvents/Timeline/index.html.twig” at line 3. at /home/mautic.noname\_server.es/mautic/docroot/app/bundles/AssetBundle/Resources/views/SubscribedEvents/Timeline/index.html.twig:3)”} {“hostname”:“www.noname\_domain.es”,“pid”:4062561}

---

<div class="post-metadata">

**Author:** ![alexrm1x](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/alexrm1x/32/2500_2.png) [@alexrm1x](https://forum.mautic.org/u/alexrm1x)\
**Post date:** [May 4, 2026, 4:29pm UTC](https://forum.mautic.org/t/error-500-when-opening-contacts-after-usage-of-assets/38144/6 "2026-05-04T16:29:23Z")

</div>

Thanks a lot, @ravi_2002 and @ejobs — your fix worked perfectly on my end too (Mautic 7.0.1, PHP 8.4). Confirming for anyone landing here from search.

Before applying it, I caught the exact error in `var/logs/mautic_prod-*.php`, which matches your diagnosis 1:1:

```auto
mautic.CRITICAL: Uncaught PHP Exception Twig\Error\LoaderError:
"Unable to find template '@MauticAsset/Asset/preview.html.twig'
(looked into: .../AssetBundle/Resources/views)
in '@MauticAsset/SubscribedEvents/Timeline/index.html.twig' at line 3."

```

One extra thing worth flagging: when I opened `index.html.twig` to apply the fix, I noticed the file also contains a leftover debug line — a literal `Hello` on line 2:

twig

```auto
<div>
Hello
{{- include('@MauticAsset/Asset/preview.html.twig', { ... }) -}}
</div>

```

It does not cause the 500, but it does render a stray “Hello” in the contact timeline whenever an asset event is shown. Looks like leftover debug code that slipped into the 7.0.1 release. I removed it along with applying the path fix, so my final file looks like:

twig

```auto
<div>
{{- include('@MauticAsset/Modules/preview.html.twig', {'activeAsset' : event.extra.asset, 'assetDownloadUrl' : url(
    'mautic_asset_action',
    {'objectAction' : 'preview', 'objectId' : event.extra.asset.getId()}
)}) -}}
</div>

```

After that and a `php bin/console cache:clear --env=prod --no-debug`, contact properties open without issues.

Thanks again!
