500 Internall Server on saving email

Your software
My Mautic version is: 4.4.0
My PHP version is: 7.4

Your problem
My problem is:
When trying to save an email I keep getting the 500 Internal server error, however the email is actually saved

These errors are showing in the log:

[2022-07-14 10:39:36] mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\DriverException: "An exception occurred while executing 'UPDATE emails SET custom_html = ? WHERE id = ?' with params ["\r\n\r\n\r\n\r\n  

Steps I have tried to fix the problem:
Writing here :smiley:

Has this ever been addressed/fixed?

Having same issue. Mautic update frim 3.3 to 4.4

Hi, any spec characters in your html? Is it a valid html?

Thank you for the quick response, Joey. The 500 error occurs anytime when saving the email. .even if you simply select the basic Mautic template and save without making any changes to it. You can create a blank template and still as the initial posted stated saving an email gives out the 500 error.

Can you go to the emails table, on your server, check the html column.
Do you have tags like or something similar multiple times at the beginning?

went to [maudg_emails] and within this table I did not find “HTML”, however I did find “custom_html” is this the column you are referencing?

If so, this is what I have in the column

<title>
    {subject}
</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,500,700" rel="stylesheet" type="text/css" />
<style type="text/css">
    #outlook a {
        padding: 0;
    }
    .ReadMsgBody {
        width: 100%;
    }
    .ExternalClass {
        width: 100%;
    }
    .ExternalClass * {
        line-height: 100%;
    }
    body {
        margin: 0;
        padding: 0;
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }
    table,
    td {
        border-collapse: collapse;
        mso-table-lspace: 0pt;
        mso-table-rspace: 0pt;
    }
    img {
        border: 0;
        height: auto;
        line-height: 100%;
        outline: none;
        text-decoration: none;
        -ms-interpolation-mode: bicubic;
    }
    p {
        display: block;
        margin: 13px 0;
    }
    @media only screen and (max-width:480px) {
        @-ms-viewport {
            width: 320px;
        }
        @viewport {
            width: 320px;
        }
    }
    body {
        font-family: "Open Sans", Helvetica, Arial, sans-serif !important;
        font-size:14px;
        line-height:1.6;
        text-align:left;
        color:#414141;
    }
    div[data-slot="text"] {
        font-size:14px !important;
        line-height:1.6 !important;
        text-align:left !important;
        color:#414141 !important;
        margin-bottom: 10px !important;
    }
    div[style="clear:both"] {
        margin-bottom: 20px !important;
    }
    .imagecard {
        background: #eeeeee !important;
    }
    .imagecard-caption {
        font-size:12px !important;
        line-height:1.6 !important;
        text-align:center !important;
        color:#414141 !important;
        background: #eeeeee !important;
        padding: 10px !important;
    }
    h1, h2, h3, h4, h5, h6 {
        margin: 0 !important;
        margin-bottom: 10px !important;
    }
    .outlook-group-fix { width:100% !important; }
    @media only screen and (min-width:480px) {
        .mj-column-per-100 {
            width: 100% !important;
        }
    }
</style>
                                  </head>
sample.com


{contactfield=company}
{contactfield=firstname} {contactfield=lastname}

RE: Music review results

{contactfield=firstname}

We have had the opportunity to review and test market your submission. The results you will find below (see below for ratings).


{contactfield=company}
Primary Response (Strongest)


Secondary Response
n/a

**** (4) Great potential
*** (3) Good potential
** (2) Almost there
* (1) Needs work

Four and three star ratings give you a recommended level towards a promotion, marketing and publicity campaign. If your release(s) met such criteria, we recommend you conduct a national campaign to increase your visibility to major record companies, publishing firms and distribution outlets. If you are attempting to secure a recording contract, publishing or distribution for your material you must have already generated substantial amount of retail sales, otherwise secured a high-level exposure.

Purpose of review:
To provide contrasting and supplementary data based on research. sample provides objective review data from the mainstream demographic. These reviews are not a review of familiarity, but rather a review of music acceptability to the target audiences.

Ratings:
Ratings are based upon a one, two, three and four-star basis. We strongly recommend promoting songs with three or four-star rating; they have great potential to become a "standard" for the target audience and with targeted media outlets. Songs with a two-star rating are not as strong, but have solid programming value, and we also do recommend promoting them as "follow up" singles or at least re-reviewing at a later date. Songs receiving one star are "borderline", few negatives, but few positives at this point. These singles are worth keeping around for the possibility of re-visiting.



:copyright: 2023 All Rights Reserved.
Tel: XXXXXXXXXX
{unsubscribe_text} | {webview_text}

Can you use this icon:

And paste it again? At least the top.