# Edit code on email builder

**URL:** <https://forum.mautic.org/t/edit-code-on-email-builder/21676>\
**Category:** Product Support\
**Created:** [November 18, 2021, 10:19pm UTC](https://forum.mautic.org/t/edit-code-on-email-builder/21676 "2021-11-18T22:19:19Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)\
**Post date:** [November 18, 2021, 10:19pm UTC](https://forum.mautic.org/t/edit-code-on-email-builder/21676/1 "2021-11-18T22:19:19Z")

</div>

**Your software**  
My Mautic version is: 4.02  
My PHP version is: 7.3  
My Database type and version is: MySQL 8+

**Your problem**  
My problem is: Cannot edit html code after saving

These errors are showing in the log: None found

Steps I have tried to fix the problem: Not idea how to fix this

I noticed when I start a new email channel and select blank as theme since I use a different application to create a email template and paste the resulting HTML code into the edit code box and save.

When I go back to make change, clicking Edit Code no longer bring up the code editor box. It look like a one time shot only. it seems once it’s save then it can’t be HTML edited again.

Is that expected or a bug?

---

<div class="post-metadata">

**Author:** ![mikew](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mikew/32/5156_2.png) [@mikew](https://forum.mautic.org/u/mikew)\
**Post date:** [November 19, 2021, 11:56am UTC](https://forum.mautic.org/t/edit-code-on-email-builder/21676/2 "2021-11-19T11:56:44Z")

</div>

Can you check in developer tools inspect and look at the console to see what errors might be showing there.

If you try and refresh the page do you get the same behaviour ?

---

<div class="post-metadata">

**Author:** ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)\
**Post date:** [November 19, 2021, 3:17pm UTC](https://forum.mautic.org/t/edit-code-on-email-builder/21676/3 "2021-11-19T15:17:38Z")

</div>

It will work again if I close browser and start with a new browser. I did not think about checking the developer tool … my bad

I will check next time when I encounter this again.

---

<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:** [November 22, 2021, 6:52am UTC](https://forum.mautic.org/t/edit-code-on-email-builder/21676/4 "2021-11-22T06:52:30Z")

</div>

Hi, this is a known bug:

> <https://github.com/mautic/mautic/issues/10455>
>
> \### Mautic Version
> 
> 4.0.0
> 
> \### PHP version
> 
> 7.4.23
> 
> \### What browsers are you se…eing the problem on?
> 
> Firefox, Chrome
> 
> \### What happened?
> 
> This is kind of related to #10398 & #10396.
> 
> I tried out the fix described in the issues linked above, removing the set ID when changing a picture by accessing the "Edit Code" function to manually remove the ID I encountered an Issue that I was not able to open the builder after closing and saving the email.
> 
> It seems that once you manually made any edit using the "edit code" option, save the email and re-open it, you cannot access the "edit code" option anymore.
> 
> \### How can we reproduce this issue?
> 
> 1. Create a new email
> 2. Choose a template 
> 3. Open the Builder 
> 4. Open the "Edit Code" option to manually edit the MJML
> 5. Make any minor change to the MJML
> 6. Save your edit by clicking on "edit"
> 7. Close the email builder
> 8. Save and Close you Mail
> 9. Re-open the mail
> 10. Go to the builder
> 11. Try to open the "edit Code"
> 12. It won't open
> 
> \### Relevant log output
> 
> \`\`\`shell
> No Logs
> \`\`\`
> 
> 
> \### Code of Conduct
> 
> \- \[X\] I confirm that I have read and agree to follow this project's Code of Conduct

However the fix is ready to be tested if you want to contribute!

---

<div class="post-metadata">

**Author:** ![mikew](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mikew/32/5156_2.png) [@mikew](https://forum.mautic.org/u/mikew)\
**Post date:** [December 22, 2021, 1:15pm UTC](https://forum.mautic.org/t/edit-code-on-email-builder/21676/5 "2021-12-22T13:15:32Z")

</div>

I went and gave it a try with the fix - unfortunately it still did not work for me ☹

---

<div class="post-metadata">

**Author:** ![zwf](https://avatars.discourse-cdn.com/v4/letter/z/f475e1/32.png) [@zwf](https://forum.mautic.org/u/zwf)\
**Post date:** [April 6, 2022, 1:59pm UTC](https://forum.mautic.org/t/edit-code-on-email-builder/21676/6 "2022-04-06T13:59:04Z")

</div>

Hi !

On Mautic 4 : Still have this bug since we did the update or even beofre I think (more than 8 months or so), quite annoying and frustrating to be honest.

---

<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:** [April 6, 2022, 8:02pm UTC](https://forum.mautic.org/t/edit-code-on-email-builder/21676/7 "2022-04-06T20:02:52Z")

</div>

Yeah, I feel you. I suffer from this every day.  
Well, all I can do is to releave the coders from testing, so I do a bunch of tests. This helps them to focus on fixing bugs.  
BTW, if you wanna join testing, it’s really easy, here is a video:

[![](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/f/f97112ed8902a8383cba86284075f761da09c2f7.jpeg "How to get started testing Mautic pull requests") ](https://www.youtube.com/watch?v=dOQX66xY5gs)
