Forum

Thread tagged as: Problem, Error, Blog

Sorry, that post could not be updated

I'm receiving a "Sorry, that post could not be updated" error on the test site of a website. It's working fine locally. Debug says:

Debug Message
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='d03e5789bc345e2f2f8487e2646dc033' LIMIT 1
UPDATE perch2_users SET userHash='2de79039c29d1ee743847861879e66c7' WHERE userID='1'
SELECT p.privKey FROM perch2_user_privileges p
SELECT * FROM (SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=1 OR userID=0 ORDER BY userID DESC) AS settings GROUP BY settingID
SELECT * FROM perch2_blog_authors WHERE authorEmail='phil@18two.co.uk' LIMIT 1
SELECT * FROM perch2_blog_sections ORDER BY sectionTitle ASC
Using template: /templates/blog/post.html
Dynamic fields:
Array
(
    [postTitle] => Amazing weekend
    [image] => 
    [theme] => dark
    [excerpt] => Array
        (
            [raw] => Words
            [processed] => 
Words

        )

    [postImage] => 
    [postDescHTML] => Array
        (
            [raw] => Words
            [processed] => 
Words

        )

    [authorSlug] => 
    [postDateTime] => 2015-07-17 14:03:00
)
INSERT INTO perch2_blog_posts(postTags,postStatus,postTemplate,authorID,sectionID,postAllowComments,postDescRaw,postDescHTML,postTitle,postDateTime,postDynamicFields,postSlug) VALUES('','Published','post.html','12','4','0','Words','<p>Words</p>','Amazing weekend','2015-07-17 14:03:00','{\"image\":null,\"theme\":\"dark\",\"excerpt\":{\"raw\":\"Words\",\"processed\":\"<p>Words<\\/p>\"},\"postImage\":null,\"authorSlug\":null}','2015-07-17-amazing-weekend')
SELECT * FROM perch2_blog_posts WHERE postID=1
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<='2015-07-17 14:03:00' GROUP BY i.indexValue
DELETE FROM perch2_category_counts WHERE countType='blog.post'
SELECT authorID, COUNT(*) AS qty FROM perch2_blog_posts WHERE postStatus='Published' AND postDateTime<='2015-07-17 14:03:00' GROUP BY authorID
UPDATE perch2_blog_authors SET authorPostCount=0
UPDATE perch2_blog_authors SET authorPostCount='7' WHERE authorID=2 LIMIT 1
UPDATE perch2_blog_authors SET authorPostCount='2' WHERE authorID=3 LIMIT 1
UPDATE perch2_blog_authors SET authorPostCount='5' WHERE authorID=4 LIMIT 1
UPDATE perch2_blog_authors SET authorPostCount='5' WHERE authorID=5 LIMIT 1
UPDATE perch2_blog_authors SET authorPostCount='5' WHERE authorID=6 LIMIT 1
UPDATE perch2_blog_authors SET authorPostCount='1' WHERE authorID=7 LIMIT 1
UPDATE perch2_blog_authors SET authorPostCount='1' WHERE authorID=8 LIMIT 1
UPDATE perch2_blog_authors SET authorPostCount='2' WHERE authorID=9 LIMIT 1
UPDATE perch2_blog_authors SET authorPostCount='3' WHERE authorID=10 LIMIT 1
UPDATE perch2_blog_authors SET authorPostCount='5' WHERE authorID=12 LIMIT 1
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<='2015-07-17 14:03:00' GROUP BY c.sectionID ORDER BY c.sectionTitle ASC
UPDATE perch2_blog_sections SET sectionPostCount=0
UPDATE perch2_blog_sections SET sectionPostCount='3' WHERE sectionID='4' LIMIT 1
UPDATE perch2_blog_sections SET sectionPostCount='22' WHERE sectionID='1' LIMIT 1
UPDATE perch2_blog_sections SET sectionPostCount='14' WHERE sectionID='3' LIMIT 1
UPDATE perch2_blog_sections SET sectionPostCount='4' WHERE sectionID='0' LIMIT 1
UPDATE perch2_blog_sections SET sectionPostCount='4' WHERE sectionID='2' LIMIT 1
SELECT COUNT(*) FROM perch2_blog_comments WHERE commentStatus='PENDING'
SELECT * FROM perch2_blog_authors ORDER BY authorFamilyName, authorGivenName ASC
Queries: 51
Memory: 4.7165
Phil Bowell

Phil Bowell 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Are both sites the same versions of Perch and Blog?

Yep, Perch 2.8.8 and blog 4.6 on both.

Drew McLellan

Drew McLellan 2638 points
Perch Support

What's different? Are they different types of server?

Ones my local MAMP server (which is working) and the other is the server I use for my website on a testing subdomain.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Is there anything in your server error log?

Hi Drew, I'm still getting this problem. I have an error log inside the blog folder which says:

[17-Jul-2015 16:38:55 Europe/Berlin] PHP Warning: PDO::quote() expects parameter 1 to be string, array given in /home/twocouk1/public_html/cmj/perch/core/lib/PerchDB_MySQL.class.php on line 378

and also an error log in the main site folder which says:

[17-Jul-2015 05:09:44 America/Detroit] PHP Warning: include(../perch/runtime.php): failed to open stream: No such file or directory in /home/twocouk1/public_html/cmj/index.php on line 1 [17-Jul-2015 05:09:44 America/Detroit] PHP Warning: include(): Failed opening '../perch/runtime.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php:/usr/local/php54/lib/php') in /home/twocouk1/public_html/cmj/index.php on line 1 [17-Jul-2015 05:09:44 America/Detroit] PHP Fatal error: Call to undefined function perch_layout() in /home/twocouk1/public_html/cmj/index.php on line 2

Not sure if they are related.

Also, nothing shows up in the debug when I try to create a new post.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Do both servers use PDO?