• Hi Marc,

    since updating to the latest version of the WP Twenty-Twenty-Two theme, I get the following error messages on top of some posts:

    Notice: Trying to get property ‘post_content’ of non-object in …/wp-content/plugins/simpletoc/plugin.php on line 299

    Strangely, it doesn’t happen on all posts which include the plugin block.

    Can you please point me in the direction whether this is a plugin incompatibility which will be fixed, or something that I can fix on my end?

    Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Marc Toensing

    (@marcdk)

    First, you should deactivate notices like this in a production environment. Second, I can’t reproduce this right now. Is there anything different in those posts? Maybe a special type of post?

    Thread Starter rhisflow

    (@rhisflow)

    Thanks for your super quick reply, Marc!

    Great tip, thank you – to deactivate such notices, is this a setting within wordpress or on the server? If you could give me a hint as to where to deactivate this, I’d appreciate it!

    I’m looking into the details as to what’s different and will get back to you as soon as I found something!

    Also, I’ve already noticed that it’s unrelated to the theme update, so it must be something about the posts – I’ll investigate!

    Plugin Author Marc Toensing

    (@marcdk)

    You have to deactivate this on the server side. I would contact the hoster if I were you.

    Thread Starter rhisflow

    (@rhisflow)

    Hi Marc, thanks so much!

    So it turns out the cause for this error notification was that some posts contained a pattern / reusable block, which no longer existed.

    So when editing those posts, the block showed “this block has been deleted or is unavailable”.

    Somehow, this caused your plugin to trip over it.

    Just letting you know in case that helps or if that is expected behavior.

    Best wishes!

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