How to Fix Endless Save Button Spinning?

Your software
My Mautic version is: 4.1.2
My PHP version is: 7.4.27
My Database type and version is: MariaDB 10.3.32

Your problem
My problem is: When saving an email in the email builder, the save button spins endlessly and never saves.

2022-01-26_10-44-56

These errors are showing in the log: none visible in prod.php logs or apache2 error logs.

Steps I have tried to fix the problem:

updated to the latest version of Mautic.
Ensured latest compatible versions of PHP and MariaDB.
Ensured sufficient disk space and memory on server.
Rebooted server.
force cleared mautic cache.

Check file permissions. Especially on mautic/var/log

Have gone through reset here:

Now instead of spinning, just throws an error 500 on attempt to save.

Error log now shows:

[2022-01-26 11:01:18] mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\DriverException: "An exception occurred while executing ‘INSERT INTO mauticemails (is_published, date_added, created_by, created_by_user, date_modified, modified_by, modified_by_user, checked_out, checked_out_by, checked_out_by_user, name, description, subject, from_address, from_name, reply_to_address, bcc_address, use_owner_as_mailer, template, content, utm_tags, plain_text, custom_html, email_type, publish_up, publish_down, read_count, sent_count, variant_sent_count, variant_read_count, revision, lang, variant_settings, variant_start_date, dynamic_content, headers, public_preview, category_id, translation_parent_id, variant_parent_id, unsubscribeform_id, preference_center_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)’ with params [1, “2022-01-26 16:01:18”,

Using the default template instead of my own HTML spits this full error:

[2022-01-26 11:12:09] mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\DriverException: “An exception occurred while executing ‘INSERT INTO mauticemails (is_published, date_added, created_by, created_by_user, date_modified, modified_by, modified_by_user, checked_out, checked_out_by, checked_out_by_user, name, description, subject, from_address, from_name, reply_to_address, bcc_address, use_owner_as_mailer, template, content, utm_tags, plain_text, custom_html, email_type, publish_up, publish_down, read_count, sent_count, variant_sent_count, variant_read_count, revision, lang, variant_settings, variant_start_date, dynamic_content, headers, public_preview, category_id, translation_parent_id, variant_parent_id, unsubscribeform_id, preference_center_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)’ with params [1, “2022-01-26 16:12:09”, 1, “Christopher Penn”, null, null, null, null, null, null, “\ud83d\udcea INBOX INSIGHTS: Process Documentation, Analytics Amnesty, Instagram Brand Content (1/26)”, null, “:mailbox_closed: INBOX INSIGHTS: Process Documentation, Analytics Amnesty, Instagram Brand Content (1/26)”, null, null, null, null, 0, “mautic_code_mode”, “a:0:{}”, “a:4:{s:9:“utmSource”;s:14:“inbox-insights”;s:9:“utmMedium”;s:5:“email”;s:11:“utmCampaign”;s:25:“inbox-insights-2022-01-26”;s:10:“utmContent”;N;}”, null, “<!doctype html>\r\n<html xmlns=“http://www.w3.org/1999/xhtml” xmlnsv=“urn:schemas-microsoft-com:vml” xmlnso=“urn:schemas-microsoft-com:office:office”>\r\n\r\n\r\n {subject}\r\n </title>\r\n<meta http-equiv=“X-UA-Compatible” content=“IE=edge” />\r\n<meta http-equiv=“Content-Type” content=“text/html; charset=UTF-8” />\r\n<meta name=“viewport” content=“width=device-width, initial-scale=1” />\r\n<link href=“https://fonts.googleapis.com/css?family=Open+Sans:300,400,500,700” rel=“stylesheet” type=“text/css” />\r\n<style type=“text/css”>\r\n #outlook a {\r\n padding: 0;\r\n }\r\n\r\n .ReadMsgBody {\r\n width: 100%;\r\n }\r\n\r\n .ExternalClass {\r\n width: 100%;\r\n }\r\n\r\n .ExternalClass * {\r\n line-height: 100%;\r\n }\r\n\r\n body {\r\n margin: 0;\r\n padding: 0;\r\n -webkit-text-size-adjust: 100%;\r\n -ms-text-size-adjust: 100%;\r\n }\r\n\r\n table,\r\n td {\r\n border-collapse: collapse;\r\n mso-table-lspace: 0pt;\r\n mso-table-rspace: 0pt;\r\n }\r\n\r\n img {\r\n border: 0;\r\n height: auto;\r\n line-height: 100%;\r\n outline: none;\r\n text-decoration: none;\r\n -ms-interpolation-mode: bicubic;\r\n }\r\n\r\n p {\r\n display: block;\r\n margin: 13px 0;\r\n }\r\n @media only screen and (max-width:480px) {\r\n @-ms-viewport {\r\n width: 320px;\r\n }\r\n @viewport {\r\n width: 320px;\r\n }\r\n }\r\n body {\r\n font-family: “Open Sans”, Helvetica, Arial, sans-serif !important;\r\n font-size:14px;\r\n line-height:1.6;\r\n text-align:left;\r\n color:#414141;\r\n }\r\n div[data-slot=“text”] {\r\n font-size:14px !important;\r\n line-height:1.6 !important;\r\n text-align:left !important;\r\n color:#414141 !important;\r\n margin-bottom: 10px !important;\r\n }\r\n div[style=“clear:both”] {\r\n margin-bottom: 20px !important;\r\n }\r\n .imagecard {\r\n background: #eeeeee !important;\r\n }\r\n .imagecard-caption {\r\n font-size:12px !important;\r\n line-height:1.6 !important;\r\n text-align:center !important;\r\n color:#414141 !important;\r\n background: #eeeeee !important;\r\n padding: 10px !important;\r\n }\r\n h1, h2, h3, h4, h5, h6 {\r\n margin: 0 !important;\r\n margin-bottom: 10px !important;\r\n }\r\n .outlook-group-fix { width:100% !important; }\r\n @media only screen and (min-width:480px) {\r\n .mj-column-per-100 {\r\n width: 100% !important;\r\n }\r\n }\r\n </style>\r\n</head>\r\n<body style=“background-color:#ffffff;”>\r\n<div data-section-wrapper=“1” style=“background-color:#ffffff;”>\r\n<div data-section=“1” style=“Margin:0px auto;border-radius:4px;max-width:600px;”>\r\n<table align=“center” border=“0” cellpadding=“0” cellspacing=“0” role=“presentation” style=“width:100%;border-radius:4px;”>\r\n\r\n\r\n<td style=“direction:ltr;padding:20px 0;text-align:center;vertical-align:top;”>\r\n<div data-slot-container=“1” class=“mj-column-per-100 outlook-group-fix” style=“font-size:13px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;”>\r\n<table background=”#FFFFFF” border=“0” cellpadding=“0” cellspacing=“0” role=“presentation” width=“100%”>\r\n\r\n\r\n<td style=“background-color:#FFFFFF;vertical-align:top;padding:20px 20px;”>\r\n<table border=“0” cellpadding=“0” cellspacing=“0” role=“presentation” width=“100%”>\r\n\r\n<td align=“left” style=“padding:0;word-break:break-word;”>\r\n<div data-slot=“text” style=“font-family:‘Open Sans’, Helvetica, Arial, sans-serif;font-size:14px;line-height:1.6;text-align:left;color:#414141;”>\r\n

Hello World!</h1>\r\nLorem ipsum dolor sit amet, consectetur adipisicing elit. Aliquid officia consequatur placeat reprehenderit excepturi, tempore,\r\nid quos quaerat ab fuga.\r\n\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit.\r\nInventore, voluptate.\r\n\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit.\r\nDignissimos alias rerum nemo ducimus modi perspiciatis.\r\n</div>\r\n</td>\r\n</tr>\r\n</table>\r\n</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</div>\r\n<div data-slot-container=“1” class=“mj-column-per-100 outlook-group-fix” style=“font-size:13px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;”>\r\n<table border=“0” cellpadding=“0” cellspacing=“0” role=“presentation” style=“vertical-align:top;” width=“100%”>\r\n\r\n<td align=“left” style=“padding:20px 20px;word-break:break-word;”>\r\n<div data-slot=“text” style=“font-family:‘Open Sans’, Helvetica, Arial, sans-serif!important;font-size:12px!important;line-height:1.4!important;text-align:left!important;color:#999999!important;”>\r\n{unsubscribe_text} | {webview_text}\r\n</div>\r\n</td>\r\n</tr>\r\n</table>\r\n</div>\r\n</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</div>\r\n</div>\r\n</body>\r\n</html>", “list”, null, null, 0, 0, 0, 0, 1, “en”, “a:0:{}”, null, “a:1:{i:0;a:3:{s:9:“tokenName”;s:17:“Dynamic Content 1”;s:7:“content”;s:23:“Default Dynamic Content”;s:7:“filters”;a:1:{i:0;a:2:{s:7:“content”;N;s:7:“filters”;a:0:{}}}}}”, “”, 1, 4, null, null, null, null]: SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect string value: ‘\xF0\x9F\x93\xAA I…’ for column mautic.mauticemails.name at row 1" at /var/www/html/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 128 {“exception”:"[object] (Doctrine\DBAL\Exception\DriverException(code: 0): An exception occurred while executing ‘INSERT INTO mauticemails (is_published, date_added, created_by, created_by_user, date_modified, modified_by, modified_by_user, checked_out, checked_out_by, checked_out_by_user, name, description, subject, from_address, from_name, reply_to_address, bcc_address, use_owner_as_mailer, template, content, utm_tags, plain_text, custom_html, email_type, publish_up, publish_down, read_count, sent_count, variant_sent_count, variant_read_count, revision, lang, variant_settings, variant_start_date, dynamic_content, headers, public_preview, category_id, translation_parent_id, variant_parent_id, unsubscribeform_id, preference_center_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)’ with params [1, “2022-01-26 16:12:09”, 1, “Christopher Penn”, null, null, null, null, null, null, “\ud83d\udcea INBOX INSIGHTS: Process Documentation, Analytics Amnesty, Instagram Brand Content (1\/26)”, null, “:mailbox_closed: INBOX INSIGHTS: Process Documentation, Analytics Amnesty, Instagram Brand Content (1\/26)”, null, null, null, null, 0, “mautic_code_mode”, “a:0:{}”, “a:4:{s:9:\“utmSource\”;s:14:\“inbox-insights\”;s:9:\“utmMedium\”;s:5:\“email\”;s:11:\“utmCampaign\”;s:25:\“inbox-insights-2022-01-26\”;s:10:\“utmContent\”;N;}”, null, “<!doctype html>\r\n<html xmlns=\“http:\/\/www.w3.org\/1999\/xhtml\” xmlnsv=\“urn:schemas-microsoft-com:vml\” xmlnso=\“urn:schemas-microsoft-com:office:office\”>\r\n\r\n\r\n {subject}\r\n <\/title>\r\n<meta http-equiv=\“X-UA-Compatible\” content=\“IE=edge\” \/>\r\n<meta http-equiv=\“Content-Type\” content=\“text\/html; charset=UTF-8\” \/>\r\n<meta name=\“viewport\” content=\“width=device-width, initial-scale=1\” \/>\r\n<link href=\“https:\/\/fonts.googleapis.com\/css?family=Open+Sans:300,400,500,700\” rel=\“stylesheet\” type=\“text\/css\” \/>\r\n<style type=\“text\/css\”>\r\n #outlook a {\r\n padding: 0;\r\n }\r\n\r\n .ReadMsgBody {\r\n width: 100%;\r\n }\r\n\r\n .ExternalClass {\r\n width: 100%;\r\n }\r\n\r\n .ExternalClass * {\r\n line-height: 100%;\r\n }\r\n\r\n body {\r\n margin: 0;\r\n padding: 0;\r\n -webkit-text-size-adjust: 100%;\r\n -ms-text-size-adjust: 100%;\r\n }\r\n\r\n table,\r\n td {\r\n border-collapse: collapse;\r\n mso-table-lspace: 0pt;\r\n mso-table-rspace: 0pt;\r\n }\r\n\r\n img {\r\n border: 0;\r\n height: auto;\r\n line-height: 100%;\r\n outline: none;\r\n text-decoration: none;\r\n -ms-interpolation-mode: bicubic;\r\n }\r\n\r\n p {\r\n display: block;\r\n margin: 13px 0;\r\n }\r\n @media only screen and (max-width:480px) {\r\n @-ms-viewport {\r\n width: 320px;\r\n }\r\n @viewport {\r\n width: 320px;\r\n }\r\n }\r\n body {\r\n font-family: \“Open Sans\”, Helvetica, Arial, sans-serif !important;\r\n font-size:14px;\r\n line-height:1.6;\r\n text-align:left;\r\n color:#414141;\r\n }\r\n div[data-slot=\“text\”] {\r\n font-size:14px !important;\r\n line-height:1.6 !important;\r\n text-align:left !important;\r\n color:#414141 !important;\r\n margin-bottom: 10px !important;\r\n }\r\n div[style=\“clear:both\”] {\r\n margin-bottom: 20px !important;\r\n }\r\n .imagecard {\r\n background: #eeeeee !important;\r\n }\r\n .imagecard-caption {\r\n font-size:12px !important;\r\n line-height:1.6 !important;\r\n text-align:center !important;\r\n color:#414141 !important;\r\n background: #eeeeee !important;\r\n padding: 10px !important;\r\n }\r\n h1, h2, h3, h4, h5, h6 {\r\n margin: 0 !important;\r\n margin-bottom: 10px !important;\r\n }\r\n .outlook-group-fix { width:100% !important; }\r\n @media only screen and (min-width:480px) {\r\n .mj-column-per-100 {\r\n width: 100% !important;\r\n }\r\n }\r\n <\/style>\r\n<\/head>\r\n<body style=\“background-color:#ffffff;\”>\r\n<div data-section-wrapper=\“1\” style=\“background-color:#ffffff;\”>\r\n<div data-section=\“1\” style=\“Margin:0px auto;border-radius:4px;max-width:600px;\”>\r\n<table align=\“center\” border=\“0\” cellpadding=\“0\” cellspacing=\“0\” role=\“presentation\” style=\“width:100%;border-radius:4px;\”>\r\n\r\n\r\n<td style=\“direction:ltr;padding:20px 0;text-align:center;vertical-align:top;\”>\r\n<div data-slot-container=\“1\” class=\“mj-column-per-100 outlook-group-fix\” style=\“font-size:13px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;\”>\r\n<table background=\”#FFFFFF\" border=\“0\” cellpadding=\“0\” cellspacing=\“0\” role=\“presentation\” width=\“100%\”>\r\n\r\n\r\n<td style=\“background-color:#FFFFFF;vertical-align:top;padding:20px 20px;\”>\r\n<table border=\“0\” cellpadding=\“0\” cellspacing=\“0\” role=\“presentation\” width=\“100%\”>\r\n\r\n<td align=\“left\” style=\“padding:0;word-break:break-word;\”>\r\n<div data-slot=\“text\” style=\“font-family:‘Open Sans’, Helvetica, Arial, sans-serif;font-size:14px;line-height:1.6;text-align:left;color:#414141;\”>\r\n

Hello World!<\/h1>\r\nLorem ipsum dolor sit amet, consectetur adipisicing elit. Aliquid officia consequatur placeat reprehenderit excepturi, tempore,\r\nid quos quaerat ab fuga.\r\n\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit.\r\nInventore, voluptate.\r\n\r\n Lorem ipsum dolor sit amet, consectetur adipisicing elit.\r\nDignissimos alias rerum nemo ducimus modi perspiciatis.\r\n<\/div>\r\n<\/td>\r\n<\/tr>\r\n<\/table>\r\n<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\n<div data-slot-container=\“1\” class=\“mj-column-per-100 outlook-group-fix\” style=\“font-size:13px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;\”>\r\n<table border=\“0\” cellpadding=\“0\” cellspacing=\“0\” role=\“presentation\” style=\“vertical-align:top;\” width=\“100%\”>\r\n\r\n<td align=\“left\” style=\“padding:20px 20px;word-break:break-word;\”>\r\n<div data-slot=\“text\” style=\“font-family:‘Open Sans’, Helvetica, Arial, sans-serif!important;font-size:12px!important;line-height:1.4!important;text-align:left!important;color:#999999!important;\”>\r\n{unsubscribe_text} | {webview_text}\r\n<\/div>\r\n<\/td>\r\n<\/tr>\r\n<\/table>\r\n<\/div>\r\n<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\n<\/div>\r\n<\/body>\r\n<\/html>", “list”, null, null, 0, 0, 0, 0, 1, “en”, “a:0:{}”, null, “a:1:{i:0;a:3:{s:9:\“tokenName\”;s:17:\“Dynamic Content 1\”;s:7:\“content\”;s:23:\“Default Dynamic Content\”;s:7:\“filters\”;a:1:{i:0;a:2:{s:7:\“content\”;N;s:7:\“filters\”;a:0:{}}}}}”, “”, 1, 4, null, null, null, null]:\n\nSQLSTATE[22007]: Invalid datetime format: 1366 Incorrect string value: ‘\xF0\x9F\x93\xAA I…’ for column mautic.mauticemails.name at row 1 at /var/www/html/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:128, Doctrine\DBAL\Driver\PDO\Exception(code: 22007): SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect string value: ‘\xF0\x9F\x93\xAA I…’ for column mautic.mauticemails.name at row 1 at /var/www/html/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18, PDOException(code: 22007): SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect string value: ‘\xF0\x9F\x93\xAA I…’ for column mautic.mauticemails.name at row 1 at /var/www/html/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:112)"}

Solved it. Apparently Mautic does not like emoji in the subject line.

1 Like