# Mjml dynamic / mjml-html

**URL:** <https://forum.mautic.org/t/mjml-dynamic-mjml-html/25560>\
**Category:** Product Support\
**Created:** [September 30, 2022, 10:42am UTC](https://forum.mautic.org/t/mjml-dynamic-mjml-html/25560 "2022-09-30T10:42:53Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![berndappl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/berndappl/32/7085_2.png) [@berndappl](https://forum.mautic.org/u/berndappl)\
**Post date:** [September 30, 2022, 10:42am UTC](https://forum.mautic.org/t/mjml-dynamic-mjml-html/25560/1 "2022-09-30T10:42:53Z")

</div>

**Your software**  
My Mautic version is: 4.4.1  
My PHP version is: 7.4  
My Database type and version is: not revelant

**Your problem**  
My problem is:

My problem is, that I don’t have dynamic content in the Email builder if I choose MJML templates, like Brinz or others. But it’s there if I choosen Blanc.  
See:

 ![mjml-vs-html](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/d/d7bec3fd30487c978e9232b10403c40c627526ef.png)

Maybe I don’t have the latest version of grapsjs software? Where can it be updated?

These errors are showing in the log:

Steps I have tried to fix the problem:  
I regenerated assets via console

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [September 30, 2022, 10:49am UTC](https://forum.mautic.org/t/mjml-dynamic-mjml-html/25560/2 "2022-09-30T10:49:42Z")

</div>

Hello, I have the dynamic slot in MJML.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/2/23c2c1944354ee1eeae1baf1d2bb2db4dafbca10.jpeg)

Version 4.4.1

---

<div class="post-metadata">

**Author:** ![robm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/robm/32/260_2.png) [@robm](https://forum.mautic.org/u/robm)\
**Post date:** [September 30, 2022, 10:56am UTC](https://forum.mautic.org/t/mjml-dynamic-mjml-html/25560/3 "2022-09-30T10:56:25Z")

</div>

Same with me 4.4.2 and no dynamic content slot.

Updated successfully via CLI and an error free install. I assumed C was not yet working with MJML but it seems it is.

How do I set about trouble shooting ths?

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [September 30, 2022, 11:13am UTC](https://forum.mautic.org/t/mjml-dynamic-mjml-html/25560/4 "2022-09-30T11:13:27Z")

</div>

Very good question. I checked and also have cli updated instances with no possibility of mjml / dyn in grapejs. The js filesize seems the same. (1 byte difference)  
Maybe @adiux knows how to troubleshoot this?

---

<div class="post-metadata">

**Author:** ![berndappl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/berndappl/32/7085_2.png) [@berndappl](https://forum.mautic.org/u/berndappl)\
**Post date:** [October 1, 2022, 9:28am UTC](https://forum.mautic.org/t/mjml-dynamic-mjml-html/25560/5 "2022-10-01T09:28:08Z")

</div>

I can’t find any guides to get the latest version of grapejs editor. Upgrading Mautic obviously doesn’t upgrade the editor. Why? I feel, that a lot of features are missing from mine.  
The dynamic content is one of them.

---

<div class="post-metadata">

**Author:** ![robm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/robm/32/260_2.png) [@robm](https://forum.mautic.org/u/robm)\
**Post date:** [October 3, 2022, 6:41am UTC](https://forum.mautic.org/t/mjml-dynamic-mjml-html/25560/6 "2022-10-03T06:41:57Z")

</div>

I use Dynamic content a lot and have resisted moving to Grape.js for that reason. I have made the move with one of my installs (4.4.2) and was disappointed to see the DC was not there. Now that I find it is supposed to be there I am super keen to get it working.

Who can help figure this out?

I am not sure if this is a bug that should be reported on Github?

Are there any specialist with the DC and Grape.js that we should tag in this thread to help us track down the issue?

Sorry to double tag you @adiux but @joeyk seems to think you may be able to shed some light here?

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [October 3, 2022, 9:00am UTC](https://forum.mautic.org/t/mjml-dynamic-mjml-html/25560/7 "2022-10-03T09:00:52Z")

</div>

Thanks for pushing it @robm , I also want to figure this out and add it to the knowledge base. Probably its just a command or some small trick. I’m sure Adrian will be able to solve this.

---

<div class="post-metadata">

**Author:** ![adiux](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/adiux/32/5793_2.png) [@adiux](https://forum.mautic.org/u/adiux)\
**Post date:** [October 3, 2022, 9:11am UTC](https://forum.mautic.org/t/mjml-dynamic-mjml-html/25560/8 "2022-10-03T09:11:11Z")

</div>

Hi. not sure what could be the problem. It was working in 4.4.1 and is no longer working in 4.4.2. 🤔

Are there maybe some errors in the browsers javascript error console?

---

<div class="post-metadata">

**Author:** ![robm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/robm/32/260_2.png) [@robm](https://forum.mautic.org/u/robm)\
**Post date:** [October 3, 2022, 9:23am UTC](https://forum.mautic.org/t/mjml-dynamic-mjml-html/25560/9 "2022-10-03T09:23:45Z")

</div>

I have loaded the grape.js email builder UI and get no console errors on load. But I do get a warning message

![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/3/3e706f6088f60d087f2917934a107c516dc67708.png)

There are the tray elements on offer to me.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/1/167ca63661f7db9180423b84facdaf9c91686075.png)

---

<div class="post-metadata">

**Author:** ![berndappl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/berndappl/32/7085_2.png) [@berndappl](https://forum.mautic.org/u/berndappl)\
**Post date:** [October 5, 2022, 6:50am UTC](https://forum.mautic.org/t/mjml-dynamic-mjml-html/25560/10 "2022-10-05T06:50:28Z")

</div>

Hello,  
I also don’t have any errors. If @adiux and @joeyk can’t help, who can we turn to?  
I am being persistant, because I have already built some automations on this, and now its a big problem for me.  
Thx in advance.

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [October 5, 2022, 2:05pm UTC](https://forum.mautic.org/t/mjml-dynamic-mjml-html/25560/11 "2022-10-05T14:05:27Z")

</div>

@adiux do you have instances with 4.4.2 - 4.4.3 and mjml / dnc working?  
I didn’t even see any changes in the code btw.

---

<div class="post-metadata">

**Author:** ![adiux](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/adiux/32/5793_2.png) [@adiux](https://forum.mautic.org/u/adiux)\
**Post date:** [October 5, 2022, 2:33pm UTC](https://forum.mautic.org/t/mjml-dynamic-mjml-html/25560/12 "2022-10-05T14:33:30Z")

</div>

We currently don’t have this problem. I’m planning on migrating to the latest version soon. Hopefully next week.

I guess this could be related to the preset version? are you building the JS yourself? Or are you using it directly from the Mautic repository? Is your file identical to this one: [mautic/builder.js at 4c947e94d334de9cc3e3b1edf2f1992b85ce8600 · mautic/mautic · GitHub](https://github.com/mautic/mautic/blob/4c947e94d334de9cc3e3b1edf2f1992b85ce8600/plugins/GrapesJsBuilderBundle/Assets/library/js/dist/builder.js)

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [October 5, 2022, 4:07pm UTC](https://forum.mautic.org/t/mjml-dynamic-mjml-html/25560/13 "2022-10-05T16:07:46Z")

</div>

Yeah, it’s the same file. Size: 4662164 byte.  
Only error: ’ “beautify” option is deprecated in mjml-core and only available in mjml cli.’

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [October 6, 2022, 3:31pm UTC](https://forum.mautic.org/t/mjml-dynamic-mjml-html/25560/14 "2022-10-06T15:31:25Z")

</div>

Look at this PR: the same way the dynamic content is missing. Built on latest.

> <https://github.com/mautic/mautic/pull/11546>
>
> \<!-- ## Which branch should I use for my PR?
> 
> Assuming that:
> 
> a = current ma…jor release
> b = current minor release
> c = future major release
> 
> \* a.x for any features and enhancements (e.g. 5.x)
> \* a.b for any bug fixes (e.g. 4.4, 5.1)
> \* c.x for any features, enhancements or bug fixes with backward compatibility breaking changes (e.g. 5.x) --\>
> 
> | Q | A
> | -------------------------------------- | ---
> | Bug fix? (use the a.b branch) | \[\]
> | New feature/enhancement? (use the a.x branch) | \[\]
> | Deprecations? | \[\]
> | BC breaks? (use the c.x branch) | \[\]
> | Automated tests included? | \[\] 
> | Related user documentation PR URL | mautic/mautic-documentation#... 
> | Related developer documentation PR URL | mautic/developer-documentation#... 
> | Issue(s) addressed | Fixes #... 
> 
> \<!--
> Additionally (see https://contribute.mautic.org/contributing-to-mautic/developer/code/pull-requests#work-on-your-pull-request):
> - Always add tests and ensure they pass.
> - Bug fixes must be submitted against the lowest maintained branch where they apply
> (lowest branches are regularly merged to upper ones so they get the fixes too.)
> - Features and deprecations must be submitted against the "4.x" branch.
> \--\>
> 
> \#### Description:
> The CKEditor doesn't automatically enters the \`\<p\>\` tag around the content in the GrapesJS builder
> 
> \<!--
> Please write a short README for your feature/bugfix. This will help people understand your PR and what it aims to do. If you are fixing a bug and if there is no linked issue already, please provide steps to reproduce the issue here.
> \--\>
> 
> \#### Steps to test this PR:
> 
> \<!--
> This part is really important. If you want your PR to be merged, take the time to write very clear, annotated and step by step test instructions. Do not assume any previous knowledge - testers may not be developers.
> \--\>
> 1. Open this PR on Gitpod or pull down for testing locally (see docs on testing PRs \[here\](https://contribute.mautic.org/contributing-to-mautic/tester))
> 2. Create a new email or use an existing one
> 3. Open the builder
> 4. Add a new text block
> 5. Type text without entering a new line, e.g. \`Hello\`
> 6. Save and preview the email
> 7. Open the source code of email. The text block doesn't wrap with \`\<p\>\`
> 8. The editor wraped it with \`\<p\>\` before, e.g. \`\<p\>Hello\</p\>\`
> 
> \<!--
> If you have any deprecations, list them here along with the new alternative.
> If you have any backwards compatibility breaks, list them here.
> \--\>
> 
> \<a href="https://gitpod.io/#https://github.com/mautic/mautic/pull/11546"\>\<img src="https://gitpod.io/button/open-in-gitpod.svg"/\>\</a\>

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/1/16a0f7009e0abdfbfd6232ce5f2602e3d370aad8.jpeg)

---

<div class="post-metadata">

**Author:** ![berndappl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/berndappl/32/7085_2.png) [@berndappl](https://forum.mautic.org/u/berndappl)\
**Post date:** [October 6, 2022, 3:54pm UTC](https://forum.mautic.org/t/mjml-dynamic-mjml-html/25560/15 "2022-10-06T15:54:30Z")

</div>

Hello @adiux thank you for addressing this.  
Is it possible, that not all features are allowed as default on my builder and I have to re-build the JS myself like building cache in Mautic?

---

<div class="post-metadata">

**Author:** ![robm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/robm/32/260_2.png) [@robm](https://forum.mautic.org/u/robm)\
**Post date:** [October 10, 2022, 10:57am UTC](https://forum.mautic.org/t/mjml-dynamic-mjml-html/25560/16 "2022-10-10T10:57:01Z")

</div>

I have just updated to 4.4.3 via cli pulling the in the latest mautic update.

No issues with the update but still no DC element in the MJML builder?

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [October 11, 2022, 5:36pm UTC](https://forum.mautic.org/t/mjml-dynamic-mjml-html/25560/18 "2022-10-11T17:36:10Z")

</div>

I have the info, that ‘the js has to be rebuilt and will work’.  
Donno how to do that at this point. I’m waiting for Friday when during the regular community sprint I can bother people more freely about it.

---

<div class="post-metadata">

**Author:** ![robm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/robm/32/260_2.png) [@robm](https://forum.mautic.org/u/robm)\
**Post date:** [October 17, 2022, 8:18am UTC](https://forum.mautic.org/t/mjml-dynamic-mjml-html/25560/19 "2022-10-17T08:18:11Z")

</div>

@joeyk did you find out anything more on Friday?

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [October 17, 2022, 8:21am UTC](https://forum.mautic.org/t/mjml-dynamic-mjml-html/25560/20 "2022-10-17T08:21:34Z")

</div>

I sure did 🙂  
This PR wasn’t merged:

> <https://github.com/mautic/grapesjs-preset-mautic/pull/30>
>
> Solution of the issue #11290 - Dynamic Content block missing in MJML email in Gr…apesJS builder in Mautic. Changes introduced by PR #26 were restored. Additionally, unnecessary duplicate script files in the dist folder have been removed.

Now that it’s merged, new updates will have the MJML DNC included.  
If you are on 4.4.3, you can redownload this javascript file, and place it in the right folder overwriting the old one:  
[https://raw.githubusercontent.com/mautic/mautic/5.x/plugins/GrapesJsBuilderBundle/Assets/library/js/dist/builder.js](https://raw.githubusercontent.com/mautic/mautic/5.x/plugins/GrapesJsBuilderBundle/Assets/library/js/dist/builder.js)  
It will work:  
[![](https://mautic.slack.com/?redir=%2Ffiles-pri%2FT02GEN0Q6-F0468AV0C4U%2Fimage.png) ](https://mautic.slack.com/?redir=%2Ffiles-pri%2FT02GEN0Q6-F0468AV0C4U%2Fimage.png)

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [October 17, 2022, 8:26am UTC](https://forum.mautic.org/t/mjml-dynamic-mjml-html/25560/21 "2022-10-17T08:26:24Z")

</div>

Sorry to be clear:  
We are in a stage now where M5 and M4 are still updated. This is a simple oversight, where a single PR wasn’t merged to both. Because of the nature of GrapesJsBuilder being a “separate entity”, noone noticed.

[Next page](https://forum.mautic.org/t/mjml-dynamic-mjml-html/25560.md?page=2)
