Forum

Thread tagged as: Error

Blog Error Log

I'm trying to finish a project and I'm getting an error message that is being created on a GoDaddy server. There are no errors on the backend or on the front end so everything appears to be running properly, but this keeps getting added to the error log. I'm not sure it is a huge deal but I would like to correct it so it doesn't continue to kick out a bigger and bigger error log. Also note that this error log is showing up in my _blog directory on the site not in the root directory. I'm wondering if this is because GoDaddy is using PHP 7.1.14 instead of an older version? Any help would be appreciated

14-Apr-2018 21:26:31 America/Denver] PHP Notice:  Undefined variable: postID in /home/htp2n5iz6dnn/public_html/_cms/addons/apps/perch_blog/runtime.php on line 114

Here is the diagnostic report

Health check
 Perch is up to date
 PHP 7.1.14 is up to date
 MySQL 5.6.39-cll-lve is up to date
 Image processing available
Summary information
Perch: 3.1.1, PHP: 7.1.14, MySQL: 5.6.39, with PDO
Server OS: Linux, cgi-fcgi
Installed apps: content (3.1.1), assets (3.1.1), categories (3.1.1), perch_blog (5.6.1), perch_forms (1.11), perch_gallery (2.8.9), perch_kraken (1.1), perch_backup (1.2)
App runtimes: <?php $apps_list = [ 'perch_blog', 'perch_gallery', 'perch_forms', ];
PERCH_LOGINPATH: /_cms
PERCH_PATH: /home/htp2n5iz6dnn/public_html/_cms
PERCH_CORE: /home/htp2n5iz6dnn/public_html/_cms/core
PERCH_RESFILEPATH: /home/htp2n5iz6dnn/public_html/_cms/resources
Image manipulation: GD Imagick
PHP limits: Max upload 16M, Max POST 8M, Memory: 128M, Total max file upload: 8M
F1: 3b606135b33e6a102526838f4152a807
Resource folder writeable: Yes
SCRIPT_NAME: /_cms/core/settings/diagnostics/index.php
REQUEST_URI: /_cms/core/settings/diagnostics/
DOCUMENT_ROOT: /home/htp2n5iz6dnn/public_html
HTTP_HOST: www.xxxxx.com
Matt Holovach

Matt Holovach 0 points

  • 1 week ago
Drew McLellan

Drew McLellan 2517 points
Perch Support

Are you using perch_blog_post_webmention_endpoint() ?

Yes I do

Drew McLellan

Drew McLellan 2517 points
Perch Support

Can you show us how?

Yes but it won't be until later I am out with the family. Thanks Drew

Sorry for the delay Drew but here is the code on my post.php page

<?php include('../_cms/runtime.php'); ?>
<!doctype html>
<html lang="en">

    <head>
        <?php perch_layout('headTop'); ?>
        <?php perch_blog_post_meta(perch_get('s')); ?>
        <link rel="alternate" type="application/rss+xml" title="RSS" href="https://www.coloradoseodesign.com/blog/rss.php" /> 
        <link href="/_css/_sharing/light.css" rel="stylesheet" type="text/css" />
        <?php perch_layout('headBottom'); ?>
        <?perch_blog_post_webmention_endpoint(perch_get('s')); ?>

    </head>

    <body itemscope itemtype="https://schema.org/blogPost">
        <?php perch_layout('blogMenu'); ?>
        <?php perch_layout('blogSharing'); ?>
         <main class="mainServices">
             <article class="hentry" itemscope itemType="http://schema.org/BlogPosting">
                <?php perch_blog_post(perch_get('s')); ?>
                    <span style="float:right;">
                        <?php perch_blog_post_categories(perch_get('s')); ?>
                    </span>
             </article>
        </main>
        <?php perch_layout('blogPreviousNext'); ?>
        <section class="webMentionsWrap">
            <div class="webMentions">
                <?perch_blog_post_ping_form(perch_get('s')); ?>
            </div>
        </section>
        <?php perch_blog_post_comments(perch_get('s')); ?>
        <?php perch_blog_post_comment_form(perch_get('s')); ?>
        <?php perch_layout('blogSupplementAlt'); ?>
        <?php perch_layout('blogFooter'); ?>
        <?php perch_layout('scriptsBody'); ?>
        <?php perch_layout('analyticstracking'); ?>
    </body>

</html>
Drew McLellan

Drew McLellan 2517 points
Perch Support

What is the value of perch_get('s') at the point you get the error?

Ok I think I understand what you are asking so I checked the source code after the page has rendered and this is what I get for the webmention get function.

<link href="/_cms/addons/apps/perch_blog/endpoint/?pid=2" rel="webmention"> 
Drew McLellan

Drew McLellan 2517 points
Perch Support

Do you have a value for s on your URL?

Drew I apologize but I don't understand what that means. I don't think I do but I'm not sure.

Drew McLellan

Drew McLellan 2517 points
Perch Support

When you get the error, what's the full URL of the page?

I don't get an error on the page it loads just fine. I get an error in the error log on my server. Here is the Blog page that has the web mention code above. http://www.tracishahan.com/blog/tester-post-04-2018

The full error in the error log is as follows:

[14-Apr-2018 21:26:31 America/Denver] PHP Notice:  Undefined variable: postID in /home/htp2n5iz6dnn/public_html/_cms/addons/apps/perch_blog/runtime.php on line 114
Drew McLellan

Drew McLellan 2517 points
Perch Support

What does your rewrite rule for that URL look like?

Here are my re-writes for the post and the post preview.

RewriteRule ^blog/([a-zA-Z0-9-/]+)/preview$ /blog/post.php?s=$1&preview=all [L]
RewriteRule ^blog/([a-zA-Z0-9-/]+)$ /blog/post.php?s=$1 [L]
Drew McLellan

Drew McLellan 2517 points
Perch Support

Ok, so it looks like the answer is that the value of perch_get('s') is tester-post-04-2018

Do you have a valid post with the slug tester-post-04-2018, and has it been published with a date in the past?

That post has always been published that way it has never changed. It is brand new "fake" placeholder post for a client. Yes if you go to the page http://www.tracishahan.com/blog/tester-post-04-2018 you will see it and that is the only way it has ever been published. You can also see it in the blog index at http://www.tracishahan.com/blog/ .

Drew McLellan

Drew McLellan 2517 points
Perch Support

For some reason the post isn't being found. Are you able to recreate the error at will?

I've checked it in 5 different browsers and it is showing up so I'm a little confused. I have in my htacess to block traffic from some countries is this keeping you from seeing it?

SetEnvIf CF-IPCountry CN BuzzOff=1
SetEnvIf CF-IPCountry UA BuzzOff=1
SetEnvIf CF-IPCountry RU BuzzOff=1
SetEnvIf CF-IPCountry IN BuzzOff=1
Order allow,deny
Allow from all
Deny from env=BuzzOff
Drew McLellan

Drew McLellan 2517 points
Perch Support

I can see the page, but not the error.

The error doesn't show up on the page. It shows up in the error log on the go Daddy server. It creates a new entry in the error log every time someone goes to that page.

Drew McLellan

Drew McLellan 2517 points
Perch Support

Can you turn debug on for that page?