• Thanks for this plugin! I’m looking forward to migrating our frontend to gatsby-source-wordpress@v4.

    I ran into an issue where if I try to log in or out of my site with WPGatsby activated, I get a bunch of “Trying to get property of non-object” notices.

    In addition to the notices, I am unable to complete the process of logging in. In the event that I attempt to log in with the plugin activated, I am redirected to the log in screen with the notices below printed at the top. In this case I need to clear the active plugins in the database to complete the log in process.

    i.e.

    Notice: Trying to get property 'post_status' of non-object in /var/www/html/wp-content/plugins/wp-gatsby/src/ActionMonitor/ActionMonitor.php on line 640 Notice: Trying to get property 'post_status' of non-object in /var/www/html/wp-content/plugins/wp-gatsby/src/ActionMonitor/ActionMonitor.php on line 650 Notice: Trying to get property 'post_type' of non-object in /var/www/html/wp-content/plugins/wp-gatsby/src/ActionMonitor/ActionMonitor.php on line 655 Notice: Trying to get property 'post_type' of non-object in /var/www/html/wp-content/plugins/wp-gatsby/src/ActionMonitor/ActionMonitor.php on line 659 Notice: Trying to get property 'ID' of non-object in /var/www/html/wp-content/plugins/wp-gatsby/src/ActionMonitor/ActionMonitor.php on line 665 Notice: Trying to get property 'post_modified' of non-object in /var/www/html/wp-content/plugins/wp-gatsby/src/ActionMonitor/ActionMonitor.php on line 675 Notice: Trying to get property 'ID' of non-object in /var/www/html/wp-content/plugins/wp-gatsby/src/ActionMonitor/ActionMonitor.php on line 679 Notice: Trying to get property 'post_type' of non-object in /var/www/html/wp-content/plugins/wp-gatsby/src/ActionMonitor/ActionMonitor.php on line 717 Notice: Trying to get property 'post_modified' of non-object in /var/www/html/wp-content/plugins/wp-gatsby/src/ActionMonitor/ActionMonitor.php on line 731 Notice: Trying to get property 'post_type' of non-object in /var/www/html/wp-content/plugins/wp-gatsby/src/ActionMonitor/ActionMonitor.php on line 733 Notice: Trying to get property 'post_status' of non-object in /var/www/html/wp-content/plugins/wp-gatsby/src/ActionMonitor/ActionMonitor.php on line 760 Notice: Trying to get property 'post_status' of non-object in /var/www/html/wp-content/plugins/wp-gatsby/src/ActionMonitor/ActionMonitor.php on line 765 Notice: Trying to get property 'post_status' of non-object in /var/www/html/wp-content/plugins/wp-gatsby/src/ActionMonitor/ActionMonitor.php on line 785 Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wp-content/plugins/wp-gatsby/src/ActionMonitor/ActionMonitor.php:640) in /var/www/html/wp-includes/pluggable.php on line 958 Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wp-content/plugins/wp-gatsby/src/ActionMonitor/ActionMonitor.php:640) in /var/www/html/wp-includes/pluggable.php on line 959 Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wp-content/plugins/wp-gatsby/src/ActionMonitor/ActionMonitor.php:640) in /var/www/html/wp-includes/pluggable.php on line 960

    When I deactivate my theme and run TwentyTwenty on my instance, with our current database, the issue still occurs.

    When I boot up a fresh instance of WordPress running v5.5.1 and the TwentyTwenty theme with a fresh database, this doesn’t happen.

    I’m at a loss. Any ideas? Let me know if you need any more info.

    Stack info
    ———————-
    PHP Version: 7.3.15
    WP Version: 5.5.1
    Theme: Custom
    Plugins Activated When Issue Occurs: WPGatsby, WP GraphQL

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter austinjherman

    (@austinjherman)

    I have a docker configuration locally so I just scrubbed all my containers and volumes and built them all again from scratch, then pulled in our production database. This has resolved the issue that was happening before.

    Thread Starter austinjherman

    (@austinjherman)

    Sorry, guys. This is actually still a problem for me.

    The error seems to indicate that the $post argument passed to the savePostGuardClauses method isn’t always guaranteed to be an object. I’m not sure why that would be the case. Any ideas?

    Plugin Author Jason Bahl

    (@jasonbahl)

    @austinjherman what version of WPGatsby are you on?

    I believe this was fixed with this Pull Request: https://github.com/gatsbyjs/wp-gatsby/pull/37 and released on October 19 as v0.5.3.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Trying to get property of non-object notices’ is closed to new replies.