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
Can I see your diagnostics report?
Sure - no worries:
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:
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.
Can you try going to this address in your browser?
Hi Drew,
I've just done that - nothing appears between the page title and the continue button, but the Perch Output shows this line:
How many posts does your blog have?
To date, this blog has 11 posts.
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?
No, that's a legacy table, it's not needed.
So do you have any other ideas on how to get this running?
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:
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:
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.