Okay
  Public Ticket #2713947
PHP Notices: property ‘name’ of non-object ‘term_id’ of non-object
Closed

Comments

  • vinnyclickconvert started the conversation

    in case you need it - Purchase Code from envato marketplace is

    ed011eb6-4fa9-4e6a-9fd3-e3a2c58e5524 -

    I have been working through and resolving a few errors.

    I’m left with a few in the WP error log including these…

    These errors persist even with all plugins disabled.

    I have further replaced the theme files, with the original files from the downloaded .zip files, to rule out any possibility of the theme files being corrupted or changed.

    Please can you help/provide support to troubleshoot these issues?

    PHP Notice: Trying to get property ‘term_id’ of non-object in /wp-content/themes/modus/inc/admin/functions.php on line 268

    PHP Notice: Trying to get property ‘name’ of non-object in /wp-content/themes/modus/inc/admin/functions.php on line 276

    I am hopeful that someone here can shine some light on this issue.

    Pasting lines 268 onwards below – the last line is line 276

    $ancestors = array_reverse( get_ancestors( $current_term->term_id, get_query_var( ‘taxonomy’ ) ) );

    foreach ( $ancestors as $ancestor ) {
    $ancestor = get_term( $ancestor, get_query_var( ‘taxonomy’ ) );

    echo ‘

    • ‘ . ‘slug, get_query_var( ‘taxonomy’ ) ) . ‘”>’ . esc_html( $ancestor->name ) . ‘‘ . ‘

    ‘;
    }

    echo ‘

    ‘ . esc_html( $current_term->name ) . ‘

    ‘;`



  •  608
    WordPress replied

    Hello,

    Can you provide an account admin so I can check that problem for you?


  •   vinnyclickconvert replied privately
  •  608
    WordPress replied

    Hello,

    I have checked your site but don't see errors. Can you take a screenshot?


  • vinnyclickconvert replied

    Hello Alex,

    Attached screenshot of the WordPress debug log and below pasted the messages in the log that I'm concerned about.

    These issues are going around and around, repeating and causing memory to run out.
    Asking host to increase memory, just results in the memory eventually being filled by this problem occuring again and again.

    I have troubleshooted the errors that I can and am just left with these.

    Please can you provide a solution to these errors? I have already ruled out the possibility that a theme file got messed up by replacing the files with the originals.

    PHP Notice: Trying to get property ‘term_id’ of non-object in /wp-content/themes/modus/inc/admin/functions.php on line 268

    PHP Notice: Trying to get property ‘name’ of non-object in /wp-content/themes/modus/inc/admin/functions.php on line 276


  •  608
    WordPress replied

    Hello,

    Can you provide the FTP info so I can check that problem for you?


  •   vinnyclickconvert replied privately
  •  608
    WordPress replied

    Hello,

    Can you try to check if the problem does that exist?