• Resolved Tony G

    (@starbuck)


    I’m using a plugin to add widget/tips to the admin dashboard. While testing with that plugin and others, plus WordPress Tooltips, The following errors are displayed within the dashboard tip.

    Notice: Trying to get property of non-object in /wp-content/plugins/wordpress-tooltips/tooltips.php on line 266

    Notice: Trying to get property of non-object in /wp-content/plugins/wordpress-tooltips/tooltips.php on line 119

    The other plugin is Ultimate Branding from WPMU DEV.

    I’ll be happy to try diagnostics on this with you to find the cause. I looked at the code but don’t have the time for extensive debugging.

    Screenshot

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tomas

    (@zhuyi)

    Hi @starbuck,

    Thanks for the message 🙂

    The line 119 is:
    $curent_content = $curent_post->post_content;

    The line 266 is:
    $post_cats = wp_get_post_categories($post->ID);

    I using wordpress tooltips in my site and I did not found this kind of problem, do you mean that amazing plugin is conflict with our wordpress tooltip? If so would you please give me a copy of the amazing plugin to replay the problem? Or if you can give me a clone of your site, it is better to find the problem?

    You can share it with our dropbox account:support # tooltips dot org.

    Thanks, have a good weekend

    Best Regards,
    Tomas

    Thread Starter Tony G

    (@starbuck)

    @zhuyi – Xièxiè – This seems to be an error with the other plugin calling hooks for the_content outside of the WP Loop. I’ve reported this issue to them. Closing this ticket.

    Thread Starter Tony G

    (@starbuck)

    @zhuyi – after discussion with the other developer, it was recommended that handlers for the_content should follow this pattern:

    
    if ( is_single() && in_the_loop() && is_main_query() ) {
    // after you get $post from global or otherwise...
      if ( is_object( $post ) && isset( $post->ID ) )
        get_revised_content();
        return $revised_content;
      }
    }
    return $content;
    

    HTH
    Regards.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Error in admin dashboard tip’ is closed to new replies.