WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] wp-includes/nav.php - Trying to get property of non-object from wp (11 posts)

  1. nashproductions
    Member
    Posted 1 year ago #

    Hello - absolutely dumb-founded by this random error-code that has appeared after no major alterations to the site

    It can be found here

    The error reads:
    Notice: Trying to get property of non-object in /hermes/bosoraweb073/b2912/nf.olivernat/public_html/e-ternity/wp-includes/nav-menu.php on line 591

    Any ideas would b e greatly appreciated - could not find any solutions to similar issues online - and very limited similar issues were even out there!

    Thank you

  2. Rajesh Soni
    Member
    Posted 1 year ago #

    Try pasting this code in wp-config.php at the end.

    error_reporting(E_ERROR);

  3. nashproductions
    Member
    Posted 1 year ago #

    Hi Rajesh, tried that.. no change. Should I be looking for something different now?

  4. Rajesh Soni
    Member
    Posted 1 year ago #

    Can you paste the last few lines of your wp-config.php file (Not the entire file)?

  5. nashproductions
    Member
    Posted 1 year ago #

    define('WP_DEBUG', false);
    
    /* That's all, stop editing! Happy blogging. */
    
    /** Absolute path to the WordPress directory. */
    if ( !defined('ABSPATH') )
    	define('ABSPATH', dirname(__FILE__) . '/');
    
    /** Sets up WordPress vars and included files. */
    require_once(ABSPATH . 'wp-settings.php');
    ?>
    error_reporting(E_ERROR);

    should I put it in the ?> maybe ??

  6. Rajesh Soni
    Member
    Posted 1 year ago #

    require_once(ABSPATH . 'wp-settings.php');
    ?>
    error_reporting(E_ERROR);

    Should be:

    require_once(ABSPATH . 'wp-settings.php');
    error_reporting(E_ERROR);
    ?>
  7. nashproductions
    Member
    Posted 1 year ago #

    okay, it reads like that now

  8. nashproductions
    Member
    Posted 1 year ago #

    Hey Rajesh - any ideas ? Was I supposed to see something change with that added?

  9. nashproductions
    Member
    Posted 1 year ago #

    I will take that as a no... :(

    Still in no resolution land, if anyone else has any ideas!!

  10. nashproductions
    Member
    Posted 1 year ago #

    Found the resolution!

    I replaced my line 591 in wp-includes nav.php
    $original_title = $original_object->post_title;

    with
    $original_title = isset( $original_object->post_title ) ? $original_object->post_title : '';

    THANK HEAVENS

  11. lhughes2474
    Member
    Posted 4 months ago #

    Hey nashproductions you are a god send, you have no idea how grateful I am for the fix that you posted. Just started wordpress, only done a few pages of my new site to log in today and see same error.

    Did not have a clue what happened or how to fix. Thank you so much for posting your fix worked perfectly for my problem. You are a genius...thank you so so much...

Topic Closed

This topic has been closed to new replies.

About this Topic