• Hello, I would really appreciate some help here as It’s all above my ability to be honest. My website seems to be hanging upon load and then ocassionally giving me an “Internal server error” and additional 500 error. Other than that it works fine apart from being slow which I think is due to this issue.

    I ran a debug and have the following error when I get the “internal server error”

    [08-Feb-2017 15:06:27 UTC] PHP Notice: Trying to get property of non-object in /home/mediaraft/public_html/wp-includes/link-template.php on line 317
    [08-Feb-2017 15:06:27 UTC] PHP Notice: Trying to get property of non-object in /home/mediaraft/public_html/wp-includes/link-template.php on line 331

    Does anyone know what this could be? I’m pulling my hair out trying to figure it out but it’s just beyond my understanding.

    This is the code on line 317 in link-template.php

    if ( ‘page’ == get_option( ‘show_on_front’ ) && $post->ID == get_option( ‘page_on_front’ ) )
    $link = home_url(‘/’);
    else
    $link = _get_page_link( $post, $leavename, $sample );

    331 is:

    return apply_filters( ‘page_link’, $link, $post->ID, $sample );

    Thanks

    James

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    The error is not in the WP code but in something else that’s calling a function that’s defined there.

    This may be a plugin or theme conflict. Please attempt to disable all plugins, and use one of the default (Twenty*) themes. If the problem goes away, enable them one by one to identify the source of your troubles.

    Thread Starter mybanemygame

    (@mybanemygame)

    Thanks for the suggestions. I disabled Jetpack and it seems to have stopped doing it. I was also getting this error

    Notice: Undefined property: stdClass::$zipball_url in /home/xxxxxx/public_html/wp-content/plugins/formcraft3-2/formcraft-main.php on line 198

    Notice: Undefined property: stdClass::$zipball_url in /home/xxxxxx/public_html/wp-content/plugins/formcraft3-2/formcraft-main.php on line 198

    So have disabled that as well and will have to use a different contact form plugin.

    Thanks for the help I think your suggestion has worked (touch wood).

    EDIT: Also getting this error:

    Undefined index: post_type in /home/xxxxx/public_html/wp-content/themes/salient17/functions.php on line 2214

    • This reply was modified 7 years, 9 months ago by mybanemygame.
    Thread Starter mybanemygame

    (@mybanemygame)

    Spoke to soon, the error is still coming up in debug but the 500 errors have stopped at least.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Trying to get property of non-object in error + ocassional Internal Server Error’ is closed to new replies.