We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum

Forum

Thread tagged as: Problem, Blog

Blog posts not saving

I'm having problems when trying to save a new blog post. When I hit 'Create draft' it goes back to the top of the page and clears the fields. If I then go to the post listing bit of the CMS there's no post. I'm the primary admin, so it shouldn't be a permissions thing and it was only the 16th of October that I published the last post successfully. I was running 3.1.2 at that point (I updated on the 26th of August) and am now on 3.1.3 so it might be something in the newest version.

Ordinary content seems to be working fine – just the blog.

Here's my diagnostics:

Perch Runway: 3.1.3, PHP: 7.2.8, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: 38fea24f2847fa7519001be390c98ae0acafe387 $, with PDO
Server OS: Darwin, cgi-fcgi
Installed apps: content (3.1.3), assets (3.1.3), categories (3.1.3), perch_blog (5.6.1), perch_forms (1.12)
App runtimes: <?php $apps_list = [ 'perch_blog', 'perch_forms', ];
PERCH_LOGINPATH: /cms
PERCH_PATH: /Users/martin/Sites/tempertemper.net/web/cms
PERCH_CORE: /Users/martin/Sites/tempertemper.net/web/cms/core
PERCH_RESFILEPATH: /Users/martin/Sites/tempertemper.net/web/cms/resources
Image manipulation: GD
PHP limits: Max upload 32M, Max POST 8M, Memory: 128M, Total max file upload: 8M
F1: 3b606135b33e6a102526838f4152a807
Resource folder writeable: Yes
HTTP_HOST: tempertemper.local
DOCUMENT_ROOT: /Users/martin/Sites/tempertemper.net/web
REQUEST_URI: /cms/core/settings/diagnostics/
SCRIPT_NAME: /cms/core/settings/diagnostics/index.php

Thanks for taking a look :)

Martin Underhill

Martin Underhill 5 points

  • 8 months ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Could you turn debug on, submit the form, and let me know what it outputs?

Hi Drew. Here's my debug when the form is submitted:

Oh, the forum isn't happy with the debug code… I'm getting a "Whoops, looks like something went wrong." message!

there's a red line in there: Invalid query: SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\xF0\x9F\x98\x8D <...' for column 'postDescRaw' at row 1

Aha! I followed that debug through and took a guess that it was an emoji. I removed the emoji and it works.

Guessing now that I've removed the emoji it would paste to the forum too, but there's probably not much point. Let me know if it's still useful though, and I'll post it :)

Drew McLellan

Drew McLellan 2638 points
Perch Support

If you switch your table encoding to utf8mb4 you'll be able to store the emoji fine. In short, it's MySQL, not Perch.

Oh nice! Thanks Drew – I'll look into switching the encoding. I seem to remember emojis tripping me up before! :D