Forum

Thread tagged as: Problem, Error, Blog

Perch Blog - "Sorry, that post could not be updated".

Hi guys,

An issue has just come up with the Perch Blog. Whenever we post a new blog, we get returned to an empty blog posting screen, and the error "Sorry, that post could not be updated.".

I've checked the Perch debug, and don't see anything weird in there, although I'm not an expert:

Debug Message
[1] SELECT u.*, r.* FROM perch2_users u, perch2_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled=1 AND u.userID=1 AND u.userHash='ef41d09df5fade832d846653257729c6' LIMIT 1
UPDATE perch2_users SET userHash='3ce9555c108f4d691b1785b26b8f96cc' WHERE userID='1'
[40] SELECT p.privKey FROM perch2_user_privileges p
[23] SELECT * FROM (SELECT DISTINCT settingID, settingValue, userID FROM perch2_settings WHERE userID=1 OR userID=0 ORDER BY userID DESC) AS settings GROUP BY settingID, settingValue, userID
[1] SELECT * FROM perch2_blog_authors WHERE authorEmail='jamesh@thirdfloordesign.co.uk' LIMIT 1
[2] SELECT * FROM perch2_blog_sections ORDER BY sectionTitle ASC
Using template: /templates/blog/post.html
[1] SELECT * FROM perch2_resources WHERE resourceID='536' LIMIT 1
[1] SELECT * FROM perch2_resources WHERE resourceAWOL=0 AND resourceParentID='536' AND resourceKey='thumb'
[1] SELECT * FROM perch2_resources WHERE resourceID='564' LIMIT 1
[1] SELECT * FROM perch2_resources WHERE resourceAWOL=0 AND resourceParentID='564' AND resourceKey='thumb'
[1] SELECT * FROM perch2_resources WHERE resourceID='542' LIMIT 1
[1] SELECT * FROM perch2_resources WHERE resourceAWOL=0 AND resourceParentID='542' AND resourceKey='thumb'
[1] SELECT * FROM perch2_resources WHERE resourceID='564' LIMIT 1
[1] SELECT * FROM perch2_resources WHERE resourceAWOL=0 AND resourceParentID='564' AND resourceKey='thumb'
[1] SELECT * FROM perch2_resources WHERE resourceAWOL=0 AND resourceParentID='564' AND resourceTargetWidth=50 AND resourceTargetHeight=50 AND resourceCrop=1 AND resourceDensity=1
Resizing and cropping image... (gd, w50 h50 @1x )
INSERT IGNORE INTO perch2_resources(resourceApp,resourceBucket,resourceFile,resourceKey,resourceParentID,resourceType,resourceCreated,resourceInLibrary,resourceWidth,resourceHeight,resourceTargetWidth,resourceTargetHeight,resourceCrop,resourceDensity,resourceFileSize,resourceMimeType,resourceTitle) VALUES('perch_blog','default','picture1-w50h50.png','w50h50c1','564','png','2017-02-17 10:04:32','0',50,50,'50','50','1','1',3991,'image/png','Picture1 w50h50')
Dynamic fields:
Array
(
    [postTitle] => Example Blog
    [mainImage] => Array
        (
            [assetID] => 536
            [title] => Earphonesbaby
            [_default] => /cms/resources/earphonesbaby.jpg
            [bucket] => default
            [path] => earphonesbaby.jpg
            [size] => 75094
            [w] => 528
            [h] => 300
            [mime] => image/jpeg
            [sizes] => Array
                (
                    [thumb] => Array
                        (
                            [w] => 150
                            [h] => 85
                            [target_w] => 150
                            [target_h] => 150
                            [density] => 2
                            [path] => earphonesbaby-thumb@2x.jpg
                            [size] => 8951
                            [mime] => 
                            [assetID] => 537
                        )

                )

        )

    [postDescHTML] => Array
        (
            [_flang] => textile
            [raw] => Example Blog
            [processed] => 
Example Blog

        )

    [excerpt] => Array
        (
            [_flang] => markdown
            [raw] => Example Blog
            [processed] => 
Example Blog

        )

    [leftImage] => Array
        (
            [assetID] => 564
            [title] => Picture1
            [_default] => /cms/resources/picture1.png
            [bucket] => default
            [path] => picture1.png
            [size] => 635409
            [w] => 796
            [h] => 796
            [mime] => image/png
            [sizes] => Array
                (
                    [thumb] => Array
                        (
                            [w] => 150
                            [h] => 150
                            [target_w] => 150
                            [target_h] => 150
                            [density] => 2
                            [path] => picture1-thumb@2x.png
                            [size] => 100778
                            [mime] => 
                            [assetID] => 565
                        )

                )

        )

    [rightImage] => Array
        (
            [assetID] => 542
            [title] => Introlowres 1
            [_default] => /cms/resources/introlowres-1-1.jpg
            [bucket] => default
            [path] => introlowres-1-1.jpg
            [size] => 891273
            [w] => 4320
            [h] => 2708
            [mime] => image/jpeg
            [sizes] => Array
                (
                    [thumb] => Array
                        (
                            [w] => 150
                            [h] => 94
                            [target_w] => 150
                            [target_h] => 150
                            [density] => 2
                            [path] => introlowres-1-1-thumb@2x.jpg
                            [size] => 10907
                            [mime] => 
                            [assetID] => 543
                        )

                )

        )

    [postDescHTML2] => Array
        (
            [_flang] => textile
            [raw] => Example Blog
            [processed] => 
Example Blog

        )

    [postDateTime] => 2017-02-17 10:04:00
    [image] => Array
        (
            [assetID] => 564
            [title] => Picture1
            [_default] => /cms/resources/picture1.png
            [bucket] => default
            [path] => picture1.png
            [size] => 635409
            [w] => 796
            [h] => 796
            [mime] => image/png
            [sizes] => Array
                (
                    [thumb] => Array
                        (
                            [w] => 150
                            [h] => 150
                            [target_w] => 150
                            [target_h] => 150
                            [density] => 2
                            [path] => picture1-thumb@2x.png
                            [size] => 100778
                            [mime] => 
                            [assetID] => 565
                        )

                    [w50h50c1] => Array
                        (
                            [w] => 50
                            [h] => 50
                            [target_w] => 50
                            [target_h] => 50
                            [crop] => true
                            [density] => 1
                            [path] => picture1-w50h50.png
                            [size] => 3991
                            [mime] => image/png
                        )

                )

        )

)
INSERT INTO perch2_blog_posts(postTags,postStatus,postAllowComments,postTemplate,authorID,sectionID,postDescRaw,postDescHTML,postTitle,postDateTime,postDynamicFields,postSlug) VALUES('Example Blog','Published','1','post.html','1','4','Example Blog','<p>Example Blog</p>','Example Blog','2017-02-17 10:04:00','{\"mainImage\":{\"assetID\":\"536\",\"title\":\"Earphonesbaby\",\"_default\":\"\\/cms\\/resources\\/earphonesbaby.jpg\",\"bucket\":\"default\",\"path\":\"earphonesbaby.jpg\",\"size\":75094,\"w\":528,\"h\":300,\"mime\":\"image\\/jpeg\",\"sizes\":{\"thumb\":{\"w\":\"150\",\"h\":\"85\",\"target_w\":150,\"target_h\":150,\"density\":2,\"path\":\"earphonesbaby-thumb@2x.jpg\",\"size\":8951,\"mime\":\"\",\"assetID\":\"537\"}}},\"excerpt\":{\"_flang\":\"markdown\",\"raw\":\"Example Blog\",\"processed\":\"<p>Example Blog<\\/p>\"},\"leftImage\":{\"assetID\":\"564\",\"title\":\"Picture1\",\"_default\":\"\\/cms\\/resources\\/picture1.png\",\"bucket\":\"default\",\"path\":\"picture1.png\",\"size\":635409,\"w\":796,\"h\":796,\"mime\":\"image\\/png\",\"sizes\":{\"thumb\":{\"w\":\"150\",\"h\":\"150\",\"target_w\":150,\"target_h\":150,\"density\":2,\"path\":\"picture1-thumb@2x.png\",\"size\":100778,\"mime\":\"\",\"assetID\":\"565\"}}},\"rightImage\":{\"assetID\":\"542\",\"title\":\"Introlowres 1\",\"_default\":\"\\/cms\\/resources\\/introlowres-1-1.jpg\",\"bucket\":\"default\",\"path\":\"introlowres-1-1.jpg\",\"size\":891273,\"w\":4320,\"h\":2708,\"mime\":\"image\\/jpeg\",\"sizes\":{\"thumb\":{\"w\":\"150\",\"h\":\"94\",\"target_w\":150,\"target_h\":150,\"density\":2,\"path\":\"introlowres-1-1-thumb@2x.jpg\",\"size\":10907,\"mime\":\"\",\"assetID\":\"543\"}}},\"postDescHTML2\":{\"_flang\":\"textile\",\"raw\":\"Example Blog\",\"processed\":\"<p>Example Blog<\\/p>\"},\"image\":{\"assetID\":\"564\",\"title\":\"Picture1\",\"_default\":\"\\/cms\\/resources\\/picture1.png\",\"bucket\":\"default\",\"path\":\"picture1.png\",\"size\":635409,\"w\":796,\"h\":796,\"mime\":\"image\\/png\",\"sizes\":{\"thumb\":{\"w\":\"150\",\"h\":\"150\",\"target_w\":150,\"target_h\":150,\"density\":2,\"path\":\"picture1-thumb@2x.png\",\"size\":100778,\"mime\":\"\",\"assetID\":\"565\"},\"w50h50c1\":{\"w\":50,\"h\":50,\"target_w\":\"50\",\"target_h\":\"50\",\"crop\":\"true\",\"density\":\"1\",\"path\":\"picture1-w50h50.png\",\"size\":3991,\"mime\":\"image\\/png\"}}}}','2017-02-17-example-blog')
[1] SELECT tagID, tagTitle FROM perch2_blog_tags WHERE tagTitle = 'Example Blog' LIMIT 1
INSERT INTO perch2_blog_tags(tagTitle,tagSlug) VALUES('Example Blog','example-blog')
INSERT INTO perch2_blog_posts_to_tags(postID,tagID) VALUES(1,1)
[1] SELECT * FROM perch2_blog_posts WHERE postID=1
[nil] SELECT COUNT(*) AS qty, c.catID FROM perch2_blog_index i, perch2_categories c, perch2_blog_posts p WHERE i.indexValue=c.catPath AND i.indexKey='_category' AND i.itemKey='postID' AND i.itemID=p.postID AND p.postStatus='Published' AND p.postDateTime<='2017-02-17 10:04:00' GROUP BY i.indexValue
DELETE FROM perch2_category_counts WHERE countType='blog.post'
[3] SELECT authorID, COUNT(*) AS qty FROM perch2_blog_posts WHERE postStatus='Published' AND postDateTime<='2017-02-17 10:04:00' GROUP BY authorID
UPDATE perch2_blog_authors SET authorPostCount=0
UPDATE perch2_blog_authors SET authorPostCount='4' WHERE authorID=1 LIMIT 1
UPDATE perch2_blog_authors SET authorPostCount='1' WHERE authorID=2 LIMIT 1
UPDATE perch2_blog_authors SET authorPostCount='8' WHERE authorID=3 LIMIT 1
[2] SELECT c.sectionID, COUNT(p.postID) AS qty FROM perch2_blog_sections c, perch2_blog_posts p WHERE c.sectionID=p.sectionID AND p.postStatus='Published' AND p.postDateTime<='2017-02-17 10:04:00' GROUP BY c.sectionID ORDER BY c.sectionTitle ASC
UPDATE perch2_blog_sections SET sectionPostCount=0
UPDATE perch2_blog_sections SET sectionPostCount='11' WHERE sectionID='4' LIMIT 1
UPDATE perch2_blog_sections SET sectionPostCount='2' WHERE sectionID='5' LIMIT 1
[0] SELECT COUNT(*) FROM perch2_blog_comments WHERE commentStatus='PENDING'
[3] SELECT * FROM perch2_blog_authors ORDER BY authorFamilyName, authorGivenName ASC
Queries: 46
Memory: 10.7369

On clicking on the post in the post listing afterwards (it still creates the post in the post listing back end), you're redirected to the edit page of a different post.

Any ideas?

Thanks! Harry

Harry Ray

Harry Ray 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Can I see your diagnostics report?

Sure - no worries:

Perch: 2.8.31
Production mode: Production (100)
Installed apps: content (2.8.31), assets (2.8.31), categories (2.8.31), perch_blog (4.6), perch_forms (1.8.2)
DB driver: PDO
DB tables: perch2_blog_authors (3), perch2_blog_comments (38), perch2_blog_index (825), perch2_blog_posts (13), perch2_blog_posts_to_tags (3), perch2_blog_sections (2), perch2_blog_tags (4), perch2_categories (0), perch2_category_counts (0), perch2_category_sets (1), perch2_content_index (660), perch2_content_items (208), perch2_content_regions (35), perch2_forms (2), perch2_forms_responses (2), perch2_navigation (0), perch2_navigation_pages (0), perch2_page_templates (4), perch2_pages (17), perch2_resource_log (773), perch2_resource_tags (117), perch2_resources (440), perch2_resources_to_tags (424), perch2_settings (24), perch2_user_passwords (0), perch2_user_privileges (40), perch2_user_role_privileges (15), perch2_user_roles (2), perch2_users (4)
Users: 4
App runtimes:
<?php
    $apps_list = array(
        'content', 
        'categories',
        'perch_forms',
        'perch_blog',
    );
Scheduled tasks for perch_blog: delete_spam_comments (1440 mins)
Editor plug-ins: markitup
H1: 23036fc1665499d13433758aac74d0e7
L1: 8768506018c0e88c4e86b4f6c4e49bf4
F1: 2edba60ed1f613d6dd804feb202456a2
headerColour: #ffffff
content_singlePageEdit: 1
helpURL:
hideBranding: 0
content_collapseList: 1
lang: en-gb
update_2.7.10: done
latest_version: 2.8.15
on_sale_version: 2.8.34
update_2.8.2: done
perch_blog_update: 5.0
headerScheme: light
perch_blog_akismet_key:
perch_blog_max_spam_days: 0
dashboard: 0
hide_pwd_reset: 0
content_hideNonEditableRegions: 0
content_frontend_edit: 0
perch_blog_comment_notify: 1
perch_blog_slug_format: %Y-%m-%d-{postTitle}-{section}
perch_blog_post_url: /blog/post-{sectionSlug}?s={postSlug}
update_2.8.31: done
siteURL: /
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_DB_USERNAME: safpro_staging
PERCH_DB_SERVER: localhost
PERCH_DB_DATABASE: safpro_db_staging
PERCH_DB_PREFIX: perch2_
PERCH_TZ: UTC
PERCH_EMAIL_FROM: jamesh@thirdfloordesign.co.uk
PERCH_EMAIL_FROM_NAME: James Holmes
PERCH_LOGINPATH: /cms
PERCH_PATH: /var/www/vhosts/safpro.co.uk/staging.safpro.co.uk/cms
PERCH_CORE: /var/www/vhosts/safpro.co.uk/staging.safpro.co.uk/cms/core
PERCH_RESFILEPATH: /var/www/vhosts/safpro.co.uk/staging.safpro.co.uk/cms/resources
PERCH_RESPATH: /cms/resources
PERCH_HTML5: 1
PERCH_YOUTUBE_API_KEY: AIzaSyA2fF18cx755p4DObIIEDK1IAfunbgP-Fo
PERCH_DEBUG: 1
PERCH_RUNWAY:
PERCH_ERROR_MODE: DIE
PERCH_DATE_LONG: %d %B %Y
PERCH_DATE_SHORT: %d %b %Y
PERCH_TIME_SHORT: %H:%M
PERCH_TIME_LONG: %H:%M:%S
PERCH_RUNWAY_ROUTED:
PERCH_STRONG_PASSWORDS:
PERCH_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: /var/www/vhosts/safpro.co.uk/staging.safpro.co.uk/cms/templates
PERCH_DEFAULT_DOC: index.php
PERCH_DEFAULT_EXT: .php
PERCH_PRODUCTION_MODE: 100
PERCH_RWD:
PERCH_HTML_ENTITIES:
PERCH_SSL:
PERCH_STRIPSLASHES:
PERCH_PROGRESSIVE_FLUSH: 1
PERCH_PARANOID:
PERCH_FORCE_SECURE_COOKIES:
PERCH_PASSWORD_MIN_LENGTH: 6
PERCH_MAX_FAILED_LOGINS: 10
PERCH_AUTH_LOCKOUT_DURATION: 1 HOUR
PERCH_VERIFY_UPLOADS:
PERCH_AUTH_PLUGIN:
PERCH_DB_CHARSET: utf8
PERCH_DB_PORT:
PERCH_DB_SOCKET:
PERCH_SESSION_TIMEOUT_MINS: 20
HOSTING SETTINGS

PHP: 5.4.13
Zend: 2.4.0
OS: Linux
SAPI: cgi-fcgi
Safe mode: not detected
MySQL client: 5.5.30
MySQL server: 5.5.30
Free disk space: 44.50 GB
Extensions: Core, date, ereg, libxml, openssl, pcre, zlib, bz2, calendar, ctype, hash, filter, ftp, gettext, gmp, SPL, iconv, pcntl, readline, Reflection, session, standard, shmop, SimpleXML, sockets, mbstring, tokenizer, xml, cgi-fcgi, curl, dom, fileinfo, gd, imagick, imap, json, ldap, exif, mcrypt, mysql, mysqli, odbc, PDO, pdo_mysql, PDO_ODBC, pdo_sqlite, Phar, snmp, sqlite3, wddx, xmlreader, xmlrpc, xmlwriter, xsl, zip, mhash, ionCube Loader
GD: Yes
ImageMagick: Yes
PHP max upload size: 128M
PHP max form post size: 8M
PHP memory limit: 128M
Total max uploadable file size: 8M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: No
PATH: /sbin:/usr/sbin:/bin:/usr/bin
PP_CUSTOM_PHP_INI: /var/www/vhosts/system/staging.safpro.co.uk/etc/php.ini
PP_CUSTOM_PHP_CGI_INDEX: fastcgi
SCRIPT_NAME: /cms/core/settings/diagnostics/index.php
REQUEST_URI: /cms/core/settings/diagnostics/?extended
QUERY_STRING: extended
REQUEST_METHOD: GET
SERVER_PROTOCOL: HTTP/1.0
GATEWAY_INTERFACE: CGI/1.1
REMOTE_PORT: 57756
SCRIPT_FILENAME: /var/www/vhosts/safpro.co.uk/staging.safpro.co.uk/cms/core/settings/diagnostics/index.php
SERVER_ADMIN: jamesh@thirdfloordesign.co.uk
DOCUMENT_ROOT: /var/www/vhosts/safpro.co.uk/staging.safpro.co.uk
REMOTE_ADDR: 82.35.54.156
SERVER_PORT: 80
SERVER_ADDR: 205.186.165.244
SERVER_NAME: staging.safpro.co.uk
SERVER_SOFTWARE: Apache
SERVER_SIGNATURE: <address>Apache Server at staging.safpro.co.uk Port 80</address>
HTTP_COOKIE: __distillery=5841f41_6654d4d4-125a-4439-a33c-cb0164be5836-6b7a09a7d-a035f2120a42-f715; muxData=mux_viewer_id=5ecf53a7-c46d-4a91-8a2e-f6baf27fce06&msn=0.321411138963976&sid=96e29c99-d7cc-4000-879e-ce6c848d0c42&sst=1487344301487&sex=1487345801487; cmsa=1; PHPSESSID=t47s51rho1lrt6f1lnm88q7og5
HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.8
HTTP_ACCEPT_ENCODING: gzip, deflate, sdch
HTTP_REFERER: https://staging.safpro.co.uk/cms/core/settings/diagnostics/
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36
HTTP_UPGRADE_INSECURE_REQUESTS: 1
HTTP_CONNECTION: close
HTTP_X_ACCEL_INTERNAL: /internal-nginx-static-location
HTTP_X_FORWARDED_FOR: 82.35.54.156
HTTP_X_REAL_IP: 82.35.54.156
HTTP_HOST: staging.safpro.co.uk
UNIQUE_ID: WKcSws26pfQAADGfJkEAAAAD
FCGI_ROLE: RESPONDER
PHP_SELF: /cms/core/settings/diagnostics/index.php
REQUEST_TIME_FLOAT: 1487344322.5406
REQUEST_TIME: 1487344322
Drew McLellan

Drew McLellan 2638 points
Perch Support

It looks like you've updated Perch but still have an old version of Blog installed. Update Blog and you should be fine.

I've just updated to the latest blog, and I'm seeing the same issue.

Here's my current diagnostics report:

PERCH INFORMATION

Perch: 2.8.31
Production mode: Production (100)
Installed apps: content (2.8.31), assets (2.8.31), categories (2.8.31), perch_blog (5.0), perch_forms (1.8.2)
DB driver: PDO
DB tables: perch2_blog_authors (3), perch2_blog_comments (38), perch2_blog_index (698), perch2_blog_posts (11), perch2_blog_posts_to_tags (3), perch2_blog_sections (3), perch2_blog_tags (4), perch2_blogs (1), perch2_categories (0), perch2_category_counts (0), perch2_category_sets (1), perch2_content_index (660), perch2_content_items (208), perch2_content_regions (35), perch2_forms (2), perch2_forms_responses (2), perch2_navigation (0), perch2_navigation_pages (0), perch2_page_templates (4), perch2_pages (17), perch2_resource_log (775), perch2_resource_tags (117), perch2_resources (440), perch2_resources_to_tags (424), perch2_settings (24), perch2_user_passwords (0), perch2_user_privileges (40), perch2_user_role_privileges (15), perch2_user_roles (2), perch2_users (4)
Users: 4
App runtimes:
<?php
    $apps_list = array(
        'content', 
        'categories',
        'perch_forms',
        'perch_blog',
    );
Scheduled tasks for perch_blog: delete_spam_comments (1440 mins)
Editor plug-ins: markitup
H1: 23036fc1665499d13433758aac74d0e7
L1: 8768506018c0e88c4e86b4f6c4e49bf4
F1: 2edba60ed1f613d6dd804feb202456a2
headerColour: #ffffff
content_singlePageEdit: 1
helpURL:
hideBranding: 0
content_collapseList: 1
lang: en-gb
update_2.7.10: done
latest_version: 2.8.15
on_sale_version: 2.8.34
update_2.8.2: done
perch_blog_update: 5.0.1
headerScheme: light
perch_blog_akismet_key:
perch_blog_max_spam_days: 0
dashboard: 0
hide_pwd_reset: 0
content_hideNonEditableRegions: 0
content_frontend_edit: 0
perch_blog_comment_notify: 1
perch_blog_slug_format: %Y-%m-%d-{postTitle}-{section}
perch_blog_post_url: /blog/post-{sectionSlug}?s={postSlug}
update_2.8.31: done
siteURL: /
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_DB_USERNAME: safpro_staging
PERCH_DB_SERVER: localhost
PERCH_DB_DATABASE: safpro_db_staging
PERCH_DB_PREFIX: perch2_
PERCH_TZ: UTC
PERCH_EMAIL_FROM: jamesh@thirdfloordesign.co.uk
PERCH_EMAIL_FROM_NAME: James Holmes
PERCH_LOGINPATH: /cms
PERCH_PATH: /var/www/vhosts/safpro.co.uk/staging.safpro.co.uk/cms
PERCH_CORE: /var/www/vhosts/safpro.co.uk/staging.safpro.co.uk/cms/core
PERCH_RESFILEPATH: /var/www/vhosts/safpro.co.uk/staging.safpro.co.uk/cms/resources
PERCH_RESPATH: /cms/resources
PERCH_HTML5: 1
PERCH_YOUTUBE_API_KEY: AIzaSyA2fF18cx755p4DObIIEDK1IAfunbgP-Fo
PERCH_DEBUG: 1
PERCH_RUNWAY:
PERCH_ERROR_MODE: DIE
PERCH_DATE_LONG: %d %B %Y
PERCH_DATE_SHORT: %d %b %Y
PERCH_TIME_SHORT: %H:%M
PERCH_TIME_LONG: %H:%M:%S
PERCH_RUNWAY_ROUTED:
PERCH_STRONG_PASSWORDS:
PERCH_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: /var/www/vhosts/safpro.co.uk/staging.safpro.co.uk/cms/templates
PERCH_DEFAULT_DOC: index.php
PERCH_DEFAULT_EXT: .php
PERCH_PRODUCTION_MODE: 100
PERCH_RWD:
PERCH_HTML_ENTITIES:
PERCH_SSL:
PERCH_STRIPSLASHES:
PERCH_PROGRESSIVE_FLUSH: 1
PERCH_PARANOID:
PERCH_FORCE_SECURE_COOKIES:
PERCH_PASSWORD_MIN_LENGTH: 6
PERCH_MAX_FAILED_LOGINS: 10
PERCH_AUTH_LOCKOUT_DURATION: 1 HOUR
PERCH_VERIFY_UPLOADS:
PERCH_AUTH_PLUGIN:
PERCH_DB_CHARSET: utf8
PERCH_DB_PORT:
PERCH_DB_SOCKET:
PERCH_SESSION_TIMEOUT_MINS: 20
HOSTING SETTINGS

PHP: 5.4.13
Zend: 2.4.0
OS: Linux
SAPI: cgi-fcgi
Safe mode: not detected
MySQL client: 5.5.30
MySQL server: 5.5.30
Free disk space: 44.54 GB
Extensions: Core, date, ereg, libxml, openssl, pcre, zlib, bz2, calendar, ctype, hash, filter, ftp, gettext, gmp, SPL, iconv, pcntl, readline, Reflection, session, standard, shmop, SimpleXML, sockets, mbstring, tokenizer, xml, cgi-fcgi, curl, dom, fileinfo, gd, imagick, imap, json, ldap, exif, mcrypt, mysql, mysqli, odbc, PDO, pdo_mysql, PDO_ODBC, pdo_sqlite, Phar, snmp, sqlite3, wddx, xmlreader, xmlrpc, xmlwriter, xsl, zip, mhash, ionCube Loader
GD: Yes
ImageMagick: Yes
PHP max upload size: 128M
PHP max form post size: 8M
PHP memory limit: 128M
Total max uploadable file size: 8M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: No
PATH: /sbin:/usr/sbin:/bin:/usr/bin
PP_CUSTOM_PHP_INI: /var/www/vhosts/system/staging.safpro.co.uk/etc/php.ini
PP_CUSTOM_PHP_CGI_INDEX: fastcgi
SCRIPT_NAME: /cms/core/settings/diagnostics/index.php
REQUEST_URI: /cms/core/settings/diagnostics/?extended
QUERY_STRING: extended
REQUEST_METHOD: GET
SERVER_PROTOCOL: HTTP/1.0
GATEWAY_INTERFACE: CGI/1.1
REMOTE_PORT: 51134
SCRIPT_FILENAME: /var/www/vhosts/safpro.co.uk/staging.safpro.co.uk/cms/core/settings/diagnostics/index.php
SERVER_ADMIN: jamesh@thirdfloordesign.co.uk
DOCUMENT_ROOT: /var/www/vhosts/safpro.co.uk/staging.safpro.co.uk
REMOTE_ADDR: 82.35.54.156
SERVER_PORT: 80
SERVER_ADDR: 205.186.165.244
SERVER_NAME: staging.safpro.co.uk
SERVER_SOFTWARE: Apache
SERVER_SIGNATURE: <address>Apache Server at staging.safpro.co.uk Port 80</address>
HTTP_COOKIE: __distillery=5841f41_6654d4d4-125a-4439-a33c-cb0164be5836-6b7a09a7d-a035f2120a42-f715; muxData=mux_viewer_id=5ecf53a7-c46d-4a91-8a2e-f6baf27fce06&msn=0.321411138963976&sid=ba478dd7-cc68-449a-b0d8-6a78c4997bf5&sst=1487582515396&sex=1487584015396; cmsa=1; PHPSESSID=cja2ivvhvsjd0q7fde73kr76k2
HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.8
HTTP_ACCEPT_ENCODING: gzip, deflate, sdch
HTTP_REFERER: https://staging.safpro.co.uk/cms/core/settings/diagnostics/
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36
HTTP_UPGRADE_INSECURE_REQUESTS: 1
HTTP_CONNECTION: close
HTTP_X_ACCEL_INTERNAL: /internal-nginx-static-location
HTTP_X_FORWARDED_FOR: 82.35.54.156
HTTP_X_REAL_IP: 82.35.54.156
HTTP_HOST: staging.safpro.co.uk
UNIQUE_ID: WKq9dM26pfQAABmBJPEAAAAA
FCGI_ROLE: RESPONDER
PHP_SELF: /cms/core/settings/diagnostics/index.php
REQUEST_TIME_FLOAT: 1487584628.2887
REQUEST_TIME: 1487584628
Drew McLellan

Drew McLellan 2638 points
Perch Support

Did you see the blog update run?

I didn't see any update run - it briefly took me to an activate.php page but I wasn't able to read anything on there before it took me back to the blog listing.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Can you try going to this address in your browser?

/cms/addons/apps/perch_blog/update/

Hi Drew,

I've just done that - nothing appears between the page title and the continue button, but the Perch Output shows this line:

Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'safpro_db_staging.perch2_blog_posts_to_categories' doesn't exist
Drew McLellan

Drew McLellan 2638 points
Perch Support

How many posts does your blog have?

To date, this blog has 11 posts.

Drew McLellan

Drew McLellan 2638 points
Perch Support

If you run that update again, do you get the same error?

Every time I visit the page, I'm seeing the same error. Do I need to create that table through PHPmyadmin?

Drew McLellan

Drew McLellan 2638 points
Perch Support

No, that's a legacy table, it's not needed.

So do you have any other ideas on how to get this running?

Drew McLellan

Drew McLellan 2638 points
Perch Support

What's the error you're currently getting?

Whenever we post a new blog, we get returned to an empty blog posting screen, and the error "Sorry, that post could not be updated.".

When visiting that update URL, nothing appears between the page title and the continue button, but the Perch Output shows this line:

Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'safpro_db_staging.perch2_blog_posts_to_categories' doesn't exist
Drew McLellan

Drew McLellan 2638 points
Perch Support

What output do you get form debug when the post fails?

I don't see any errors in the output - I'll post it below:

SELECT u.*, r.* FROM perch2_users u, perch2_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled=1 AND u.userID=1 AND u.userHash='d2f5506f6756c8628d8b2077e56d829f' LIMIT 1
UPDATE perch2_users SET userHash='e0507158d1738361f55dc82fc6abb881' WHERE userID='1'
[40] SELECT p.privKey FROM perch2_user_privileges p
[23] SELECT * FROM (SELECT DISTINCT settingID, settingValue, userID FROM perch2_settings WHERE userID=1 OR userID=0 ORDER BY userID DESC) AS settings GROUP BY settingID, settingValue, userID
[1] SELECT * FROM perch2_blog_authors WHERE authorEmail='jamesh@thirdfloordesign.co.uk' LIMIT 1
[1] SELECT * FROM perch2_blogs WHERE blogID=1 LIMIT 1
[9] SELECT * FROM perch2_blog_sections WHERE blogID='1' ORDER BY sectionTitle ASC
Using template: /templates/blog/post.html
[1] SELECT * FROM perch2_resources WHERE resourceID='556' LIMIT 1
[1] SELECT * FROM perch2_resources WHERE resourceAWOL=0 AND resourceParentID='556' AND resourceKey='thumb'
INSERT INTO perch2_blog_posts(postStatus,postTemplate,postDescRaw,postDescHTML,postTitle,postDateTime,postDynamicFields,blogID,postSlug) VALUES('Published','post.html','Example Blog post','<p>Example Blog post</p>','Example Blog Post','2017-02-20 11:55:00','{\"mainImage\":{\"assetID\":\"556\",\"title\":\"zerbrochener Bauhelm\",\"_default\":\"\\/cms\\/resources\\/ppe-safety-helmet-broken-construction-site.jpg\",\"bucket\":\"default\",\"path\":\"ppe-safety-helmet-broken-construction-site.jpg\",\"size\":360499,\"w\":650,\"h\":435,\"mime\":\"image\\/jpeg\",\"sizes\":{\"thumb\":{\"w\":\"150\",\"h\":\"100\",\"target_w\":150,\"target_h\":150,\"density\":2,\"path\":\"ppe-safety-helmet-broken-construction-site-thumb@2x.jpg\",\"size\":20959,\"mime\":\"\",\"assetID\":\"557\"}}},\"excerpt\":{\"_flang\":\"markdown\",\"raw\":\"\",\"processed\":\"\"},\"leftImage\":null,\"rightImage\":null,\"postDescHTML2\":{\"_flang\":\"textile\",\"raw\":\"\",\"processed\":\"\"},\"image\":null}','1','2017-02-20-example-blog-post')
[1] SELECT * FROM perch2_blog_posts WHERE postID=1
[nil] SELECT COUNT(*) AS qty, c.catID FROM perch2_blog_index i, perch2_categories c, perch2_blog_posts p WHERE i.indexValue=c.catPath AND i.indexKey='_category' AND i.itemKey='postID' AND i.itemID=p.postID AND p.postStatus='Published' AND p.postDateTime<='2017-02-20 11:55:00' GROUP BY i.indexValue
DELETE FROM perch2_category_counts WHERE countType='blog.post'
[4] SELECT authorID, COUNT(*) AS qty FROM perch2_blog_posts WHERE postStatus='Published' AND postDateTime<='2017-02-20 11:55:00' GROUP BY authorID
UPDATE perch2_blog_authors SET authorPostCount=0
UPDATE perch2_blog_authors SET authorPostCount='3' WHERE authorID=0 LIMIT 1
UPDATE perch2_blog_authors SET authorPostCount='1' WHERE authorID=1 LIMIT 1
UPDATE perch2_blog_authors SET authorPostCount='1' WHERE authorID=2 LIMIT 1
UPDATE perch2_blog_authors SET authorPostCount='8' WHERE authorID=3 LIMIT 1
[3] SELECT c.sectionID, COUNT(p.postID) AS qty FROM perch2_blog_sections c, perch2_blog_posts p WHERE c.sectionID=p.sectionID AND p.postStatus='Published' AND p.postDateTime<='2017-02-20 11:55:00' GROUP BY c.sectionID ORDER BY c.sectionTitle ASC
UPDATE perch2_blog_sections SET sectionPostCount=0
UPDATE perch2_blog_sections SET sectionPostCount='8' WHERE sectionID='4' LIMIT 1
UPDATE perch2_blog_sections SET sectionPostCount='2' WHERE sectionID='5' LIMIT 1
UPDATE perch2_blog_sections SET sectionPostCount='21' WHERE sectionID='1' LIMIT 1
Edit mode: edit
[0] SELECT COUNT(*) FROM perch2_blog_comments WHERE commentStatus='PENDING'
Queries: 37
Memory: 5.3524
Drew McLellan

Drew McLellan 2638 points
Perch Support

Does the post get created?

It does get listed, although clicking on it (or any subsequent posts) takes you to the initial post that was created under these circumstances, and removing any of them removes all of them. It looks like their IDs are getting duplicated or something, because they all act as one post.