# Troubleshooting Mautic 5 Theme Compatibility

**URL:** <https://forum.mautic.org/t/troubleshooting-mautic-5-theme-compatibility/29620>\
**Category:** Development\
**Tags:** mautic-5\
**Created:** [October 11, 2023, 4:40pm UTC](https://forum.mautic.org/t/troubleshooting-mautic-5-theme-compatibility/29620 "2023-10-11T16:40:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ricfreire](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ricfreire/32/14973_2.png) [@ricfreire](https://forum.mautic.org/u/ricfreire)\
**Post date:** [October 11, 2023, 4:40pm UTC](https://forum.mautic.org/t/troubleshooting-mautic-5-theme-compatibility/29620/1 "2023-10-11T16:40:14Z")

</div>

**Your software**  
My Mautic version is: 5.0-alpha1  
My PHP version is: 8.0.2

**Your problem**  
I am in the process of making my current email templates compatible with Mautic 5. However, I’m aware that the paths are different for Mautic 5, and the version 4 doesn’t work with the newest Mautic versions that will be released. For example:

Mautic 4 (theme/html/message.html.twig)  
`{% extends ":"~template~":base.html.twig" %}`

Mautic 5 (theme/html/message.html.twig)  
`{% extends "@themes/"~template~"/html/base.html.twig" %}`

I would like to know how the paths work for email.html.twig in Mautic 5. For Mautic 4:  
`<mj-image src="{{getAssetUrl('themes/'~template~'/assets/logo.png')}}" width="300px" align="left" />`

I need to correct the paths for the content folders. Since there is no documentation available, it’s been challenging to find a solution. I’ve conducted some tests but haven’t found the solution yet. If someone could assist me, I would greatly appreciate it.

Thank you very much,  
Ricardo

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [October 12, 2023, 7:34am UTC](https://forum.mautic.org/t/troubleshooting-mautic-5-theme-compatibility/29620/2 "2023-10-12T07:34:58Z")

</div>

I’m not aware of any changes needed for templates. Those used Twig even in M4. Can you describe what is the problem? Is it returning wrong path? What path is it? Are the core themes not working?

---

<div class="post-metadata">

**Author:** ![ricfreire](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ricfreire/32/14973_2.png) [@ricfreire](https://forum.mautic.org/u/ricfreire)\
**Post date:** [October 12, 2023, 8:54am UTC](https://forum.mautic.org/t/troubleshooting-mautic-5-theme-compatibility/29620/3 "2023-10-12T08:54:48Z")

</div>

Hi @escopecz

Thank you for your feedback. I encountered an issue when trying to use my Mautic 4 email templates with Mautic 5. Initially, the paths weren’t functioning properly. However, with the assistance of @lenonleite, we managed to rectify the issue with the message.html.twig file.

Currently, I’m facing a problem where the images paths are recognized by the builder, and even display correctly in the preview. However, when the email is sent, the images fail to appear. This is exemplified by the following:

![Broken image paths on the email sent](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/2/25128e51e8e11cea8b825c806b37c587d4df5a52.png)

It doesn’t show any errors in the logs or anything. If you’re suggesting that it should work fine with the themes, could this be a bug?

Thanks,  
Ricardo

---

<div class="post-metadata">

**Author:** ![ricfreire](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ricfreire/32/14973_2.png) [@ricfreire](https://forum.mautic.org/u/ricfreire)\
**Post date:** [October 12, 2023, 9:29am UTC](https://forum.mautic.org/t/troubleshooting-mautic-5-theme-compatibility/29620/4 "2023-10-12T09:29:18Z")

</div>

Hello again,

I apologize for the previous confusion and inconvenience. Actually the native email templates are functioning as expected during sending. Additionally, when I used the same path as the Paprika theme for my custom themes, it successfully rendered the images. Here’s the code snippet I employed for reference:

`src="{{ getAssetUrl('themes/'~template~'/assets/editor.png', null, null, true) }}"`

Thanks for the help once again,  
Ricardo

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/1X/43c63600fe51440378769136903f1fa2a9a34102.png) [@system](https://forum.mautic.org/u/system)\
**Post date:** [October 13, 2023, 9:29pm UTC](https://forum.mautic.org/t/troubleshooting-mautic-5-theme-compatibility/29620/5 "2023-10-13T21:29:40Z")

</div>

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.
