Error 500 when creating Plain Text version and save

Your software
My Mautic version is: PHP 7.1.33-21
My PHP version is: PHP 7.1.33-21
My Database type and version is: 2.15.3

Your problem
I’ve duplicate a Marketing email in Mautic as a segment email. Updated the Internal name. This works ok for a test send but has incomplete Plain text. If I auto generate plain text and save I get an Error 500 in the browser. Mautic’s log seems to point to an incorrect date format. But I’m unsure how to solve this as it seems like a coding error.

I do have access to ssh and the database.

Would manually changing the date time field resolve this?

I’ve replaced some of the values like usernames and email addresses in the log below

These errors are showing in the log :
[2020-10-30 10:20:41] mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\DriverException: "An exception occurred while executing ‘INSERT INTO mtc_emails (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, 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 [0, “2020-10-30 08:20:41”, 1, “User Name Replaced Here”, null, null, null, null, null, null, “Internal Mail name replaced here”, null, “Subject line replaced here”, “”, “”, “”, null, “blank”, “a:0:{}”, “a:4:{s:9:“utmSource”;N;s:9:“utmMedium”;N;s:11:“utmCampaign”;N;s:10:“utmContent”;N;}”, “HALLO {CONTACTFIELD=FIRSTNAME}’ for column mauticdb.mtc_emails.plain_text at row 1 at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:115, Doctrine\DBAL\Driver\PDOException(code: 22007): SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect string value: ‘\xF0\x9F\x8E\x81\x0A\x0A…’ for column mauticdb.mtc_emails.plain_text at row 1 at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:107, PDOException(code: 22007): SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect string value: ‘\xF0\x9F\x8E\x81\x0A\x0A…’ for column mauticdb.mtc_emails.plain_text at row 1 at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:105)”}

Steps I have tried to fix the problem:

  • I retried.
  • Checked that I filled out all the fields.
  • Busy looking into correcting the date format by hand in Mysql.

Have you considered upgrading to a more current version of Mautic? Version 2.x support ended in June of 2020.
That’s not to say the community won’t try to help, but it’s harder to diagnose when your version is 2 - 3 major releases behind, and the jump to Mautic 3 is huge in terms of changes

@EJL I hear you there. I’ve been hanging back because I need the most stable version available. I want Mautic’s core to mostly work after installing Mautic with it’s requirements. @Yosu_Cadilla has a blog that seems to suggest older versions are much more stable.

TL;DR; I’ll move to any version if it will actually have a working core out of the box after install that would run a single campaign without breaking. But if I need to bump into one more Post Fresh install bug I may as well develop my own solution that is tested properly prior to release. I’d gladly contribute if I thought that would solve anything.

I’ve tried upgrading to the next version but the migration script killed my database and the install did not function after upgrade. It’s fairly easy to stand-up the old version again. But I don’t really have time to keep playing without getting some value out of Mautic on any level. I have been seriously trying to get a working install going for the last 18months. After an install and satisfying Mautics server and installation requirements it works. But Mautic always seems to be broken in weird and wonderful ways that aren’t apparent until you really try to depend on it. Then it seems to just fizzle out. And I am throwing more than ample hardware at it.

What version are you using at this point in time. And how much work did you need to do to get a working install going. 24months after installing initially and a lot of experimentation later I have yet to see Mautic running properly for a full marketing campaign.

I administrate several servers and systems professionally and do some PHP development. And I’ve been at it for just over 2 Decades.

But I’ve reached a point where either Mautic needs to work or I may as well start developing just the essential features that I use in Laravel or Symphony. It’s more work to replace Mautic as it is now but at least it will do what I expect. Of all the OpenSource solutions I’ve used over the years Mautic is the most unstable and unreliable piece of code. If it does work it will be wonderful but right now it just hogs server space.

I run 3.1.2 and its flawless. I had problems with 2.15 and 2.16 and the upgrade to 3.x was a learning curve but my issues came down to needing to upgrade my mariadb version. I had an issue with an early 3 version breaking some email formatting but that problem took care of itself after updating.

Once I got it figured out with some help from this forum I have pounded Mautic as hard as I can and I have not broke it yet. Ive ran 15+ million contacts through it, using 176 segments to cleanse and aggregate the right sectors together while running 30 simultaneous uploads for 17 days straight and the worst has been some exception errors of processes overlapping. Totally my fault.
Dont give up

1 Like

@EJL Thanks for that comment. It’s very encouraging to hear of working installations. I’ve rebuilt my entire install and moved it to Ubuntu recently after having just too many issues with Mautic on Centos. But it’s still not stable. May be worth it to just abandon the version and move to a fresh 3.1.2 install.

I’ll spin up a 3.1.2 version before the day’s out. :grinning:

Then we’d at least face similar issues if there are any.

I run Centos 7…lol

As long as you meet the minimum requirements I think you will be alright.

I hear you it makes no sense. And I run all our other production hosting servers in Centos7.

With all the dependencies met Mautic 2.x never worked properly with Centos6 or 7 for that matter. The reason I moved it to Ubuntu is because Centos has it’s own forks of Apache and MariaDB. So there is an underlying difference albeit slight. After doing this suddenly my Admin area statistics came alive for the first time.

But I have to say you’re right Mautic 3.1.2 looks rock solid right out the gate. The install is done and reverse proxied. First email sends work. Dashboard works. Campaign emails go out!