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: Error

Here is the error log will that work. When I turn on the debug it adds errors to this error_log.

http://www.tracishahan.com/blog/error_log

Drew McLellan

Drew McLellan 2638 points
Perch Support

Can you please enable Perch's debug function for that page?

https://docs.grabaperch.com/perch/building/troubleshooting/how-do-i-debug-problems/

I did and here is what was added to the page.

Debug Message - Perch 3.1.1
[39] SELECT DISTINCT settingID, settingValue FROM perch3_settings WHERE userID=0
[1] SELECT SQL_CALC_FOUND_ROWS DISTINCT tbl.* FROM ( SELECT idx.itemID, main.*, idx2.indexValue as sortval FROM perch3_blog_index idx JOIN perch3_blog_posts main ON idx.itemID=main.postID AND idx.itemKey='postID' JOIN perch3_blog_index idx2 ON idx.itemID=idx2.itemID AND idx.itemKey='postID' AND idx2.indexKey='_id' WHERE 1=1 AND ((idx.indexKey='postSlug' AND idx.indexValue='tester-post-04-2018')) AND idx.itemID=idx2.itemID AND idx.itemKey=idx2.itemKey GROUP BY idx.itemID, idx2.indexValue, postID ) as tbl WHERE (postStatus='Published' AND postDateTime<='2018-04-19 07:09:00' ) GROUP BY itemID, sortval ORDER BY sortval ASC LIMIT 0, 10
[1] SELECT FOUND_ROWS() AS `count`
[1] Using template: /templates/blog/meta_head.html
[1] SELECT * FROM perch3_blog_authors ORDER BY authorFamilyName, authorGivenName ASC
[1] SELECT * FROM perch3_blog_sections ORDER BY sectionTitle ASC
[1] SELECT * FROM perch3_blogs ORDER BY blogTitle ASC
[39] SELECT DISTINCT settingID, settingValue FROM perch3_settings WHERE userID=0
[1] SELECT * FROM perch3_blog_posts WHERE postStatus='Published' AND postDateTime<='2018-04-19 07:09:00' AND postSlug='tester-post-04-2018'
[1] SELECT SQL_CALC_FOUND_ROWS DISTINCT tbl.* FROM ( SELECT idx.itemID, main.*, idx2.indexValue as sortval FROM perch3_blog_index idx JOIN perch3_blog_posts main ON idx.itemID=main.postID AND idx.itemKey='postID' JOIN perch3_blog_index idx2 ON idx.itemID=idx2.itemID AND idx.itemKey='postID' AND idx2.indexKey='_id' WHERE 1=1 AND ((idx.indexKey='postSlug' AND idx.indexValue='tester-post-04-2018')) AND idx.itemID=idx2.itemID AND idx.itemKey=idx2.itemKey GROUP BY idx.itemID, idx2.indexValue, postID ) as tbl WHERE (postStatus='Published' AND postDateTime<='2018-04-19 07:09:00' ) GROUP BY itemID, sortval ORDER BY sortval ASC LIMIT 0, 10
[1] SELECT FOUND_ROWS() AS `count`
[1] Using template: /templates/blog/post.html
[39] SELECT DISTINCT settingID, settingValue FROM perch3_settings WHERE userID=0
Fetching from cache: perch_blog_post_categoriese36e516377a854f4aeb5fad6cf4f4aa8
Cache file not found: perch_blog_post_categoriese36e516377a854f4aeb5fad6cf4f4aa8
[0] Using template: /templates/blog/post_category_link.html
[1] SELECT SQL_CALC_FOUND_ROWS DISTINCT tbl.* FROM ( SELECT idx.itemID, main.*, idx2.indexValue as sortval FROM perch3_blog_index idx JOIN perch3_blog_posts main ON idx.itemID=main.postID AND idx.itemKey='postID' JOIN perch3_blog_index idx2 ON idx.itemID=idx2.itemID AND idx.itemKey='postID' AND idx2.indexKey='_id' WHERE 1=1 AND ((idx.indexKey='postSlug' AND idx.indexValue='tester-post-04-2018')) AND idx.itemID=idx2.itemID AND idx.itemKey=idx2.itemKey GROUP BY idx.itemID, idx2.indexValue, postID ) as tbl WHERE (postStatus='Published' AND postDateTime<='2018-04-19 07:09:00' ) GROUP BY itemID, sortval ORDER BY sortval ASC LIMIT 0, 10
[1] SELECT FOUND_ROWS() AS `count`
[1] Using template: /templates/blog/post.html
[39] SELECT DISTINCT settingID, settingValue FROM perch3_settings WHERE userID=0
[1] SELECT SQL_CALC_FOUND_ROWS DISTINCT tbl.* FROM ( SELECT idx.itemID, main.*, idx2.indexValue as sortval FROM perch3_blog_index idx JOIN perch3_blog_posts main ON idx.itemID=main.postID AND idx.itemKey='postID' JOIN perch3_blog_index idx2 ON idx.itemID=idx2.itemID AND idx.itemKey='postID' AND idx2.indexKey='_id' WHERE 1=1 AND ((idx.indexKey='postSlug' AND idx.indexValue='tester-post-04-2018')) AND idx.itemID=idx2.itemID AND idx.itemKey=idx2.itemKey GROUP BY idx.itemID, idx2.indexValue, postID ) as tbl WHERE (postStatus='Published' AND postDateTime<='2018-04-19 07:09:00' ) GROUP BY itemID, sortval ORDER BY sortval ASC LIMIT 0, 10
[1] SELECT FOUND_ROWS() AS `count`
Using template: /templates/blog/post.html
[nil] SELECT SQL_CALC_FOUND_ROWS DISTINCT tbl.* FROM ( SELECT idx.itemID, main.*, idx2.indexValue as sortval FROM perch3_blog_index idx JOIN perch3_blog_posts main ON idx.itemID=main.postID AND idx.itemKey='postID' JOIN perch3_blog_index idx2 ON idx.itemID=idx2.itemID AND idx.itemKey='postID' AND idx2.indexKey='postDateTime' WHERE 1=1 AND ((idx.indexKey='postDateTime' AND idx.indexValue < '2018-04-14 14:19:00')) AND idx.itemID=idx2.itemID AND idx.itemKey=idx2.itemKey GROUP BY idx.itemID, idx2.indexValue, postID ) as tbl WHERE (postStatus='Published' AND postDateTime<='2018-04-19 07:09:00' ) GROUP BY itemID, sortval ORDER BY sortval DESC LIMIT 0, 1
[1] SELECT FOUND_ROWS() AS `count`
Using template: /templates/blog/post_prev.html
[nil] SELECT SQL_CALC_FOUND_ROWS DISTINCT tbl.* FROM ( SELECT idx.itemID, main.*, idx2.indexValue as sortval FROM perch3_blog_index idx JOIN perch3_blog_posts main ON idx.itemID=main.postID AND idx.itemKey='postID' JOIN perch3_blog_index idx2 ON idx.itemID=idx2.itemID AND idx.itemKey='postID' AND idx2.indexKey='postDateTime' WHERE 1=1 AND ((idx.indexKey='postDateTime' AND idx.indexValue > '2018-04-14 14:19:00')) AND idx.itemID=idx2.itemID AND idx.itemKey=idx2.itemKey GROUP BY idx.itemID, idx2.indexValue, postID ) as tbl WHERE (postStatus='Published' AND postDateTime<='2018-04-19 07:09:00' ) GROUP BY itemID, sortval ORDER BY sortval ASC LIMIT 0, 1
[1] SELECT FOUND_ROWS() AS `count`
Using template: /templates/blog/post_next.html
[1] SELECT * FROM perch3_blog_posts WHERE postID=2 AND postStatus='Published' AND postDateTime<='2018-04-19 07:09:00'
Using template: /templates/blog/ping_form.html
[nil] SELECT * FROM perch3_blog_comments WHERE 1=1 AND postID=2 AND commentStatus='LIVE' ORDER BY FIELD(webmentionType, 'like', 'repost', 'comment', NULL) ASC, commentDateTime ASC
[0] Using template: /templates/blog/comment.html
Using template: /templates/blog/comment_form.html
Using template: /templates/search/search-form.html

Drew,

The php error log is giving this error

Undefined variable: postID in /home/htp2n5iz6dnn/public_html/_cms/addons/apps/perch_blog/runtime.php on line 114

Here is the line of code on line 114 of the runtime.php page

$url = PERCH_LOGINPATH.'/addons/apps/perch_blog/endpoint/?pid='.$postID;

Is it possible that this is error is being caused by using PHP 7.1 (Godaddy recommends using 7.1)? I don't see these error logs before when using Hostgator hosting and using PHP 5.4 (Hostgator recommends using 5.4 I believe)

Drew McLellan

Drew McLellan 2638 points
Perch Support

I've no idea what's going on with this. For the sake of eliminating anything that's remotely incorrect, could you replace your code here:

<?perch_blog_post_webmention_endpoint(perch_get('s')); ?>

with the correction:

<?php perch_blog_post_webmention_endpoint(perch_get('s')); ?>

I have made the change. FYI, it isn't the end of the world everything works fine. I just don't like that it keeps hitting the error log, but that doesn't affect the functionality of the site.