• Resolved haleksandrov

    (@haleksandrov)


    Hey,

    We’re using Yoast and after the latest update, on most pages we are getting this warning:
    Notice: Trying to get property ‘display_name’ of non-object in /xxxx/xxxx/xxxx/wp-content/plugins/wordpress-seo/src/presenters/meta-author-presenter.php on line 40

    Is there any chance there’s a filter, as I looked through an old similar issue, but it was patched by the Author of the plugin.

    Thanks!

Viewing 12 replies - 1 through 12 (of 12 total)
  • Exactly the same here after update to 19.2:

    PHP Notice: Trying to get property 'display_name' of non-object in /xxx/xxx/xxxxxxxxx.com/httpdocs/wp-content/plugins/wordpress-seo/src/presenters/meta-author-presenter.php on line 40

    • This reply was modified 3 years, 7 months ago by mayersdesign.

    @mayersdesign

    I use machine translation to reply.

    I was suffering from the same “Warning” as you, but
    Today I found a way to solve the error.

    It seems that the “Warning” appears when the Author field of a fixed page or post is empty.
    When I select the Author from the list, the “Warning” disappears.

    Please run this on all pages where the error appears.

    Hope this helps you too.

    @pixelium – Thanks very much for the feedback. Of course the plugin should fail more gracefully, but it’s nice to have a solution, and I suppose the pages “should” have an author πŸ˜‰

    hi @pixelium , may i know how can I locate the “Author field of a fixed page”?
    In my case, the same notice sign appears on my WooCommerce Product page.

    Thread Starter haleksandrov

    (@haleksandrov)

    Hey @darren666, on the top of any page/post/product, you have “Screen Options”, there you can select the “Author” field, as it’s most likely just hidden for you. After that, all you need to do is save the page and the warning will no longer show.

    This is somewhat of a solution, but if you have a ton of products/posts/pages you might want to find another way. Hopefully, Yoast push an update soon.

    Plugin Support Maybellyne

    (@maybellyne)

    Hello @haleksandrov @darren666 @mayersdesign @pixelium

    I am sorry that you all encountered that error; our developers are aware and a fix has been written for the warning that got introduced in 19.2. It will be included in the next release of the plugin.

    We don’t have a fixed date or release date but please know that we frequently release new versions. Most times, it’s on a 2-week cycle.

    Thank you once again for reaching out!

    I have posted a similar, but different issue at the top of the thread, I did see this though! Somebody does scroll still! Haha, just thought I’d include my specific circumstances for this round of bug troubleshooting. Mine was a null and a bool, yet still a named wordpress-seo issue.

    Hi @maybellyne

    Can we get the previous version of the plugin? I can not wait 2 weeks.

    Thanks!

    @khouya – Out of interest, why can’t you simply wait? This is only a notice after all, plus there’s a simple workaround, that’s probably recommended anyway (adding an author to all pages)

    @haleksandrov @mayersdesign @damax83 @darren666 @pixelium

    For those who are interested, I replaced with version 19.1 and the problem is solved. You can download previous versions here (end of page). Just replace the current version (19.2) with the previous (19.1):

    English: https://wordpress.org/plugins/wordpress-seo/advanced/
    French: https://fr.wordpress.org/plugins/wordpress-seo/advanced/

    @mayersdesign It also appears on WooCommerce product pages. Customers can see the errors. We have a lot of products (and many do not have authors).

    @khouya Ah. I had wondered after I posted if you had notices set to display on production. I would advise turning those off (and logging them instead).

    Thread Starter haleksandrov

    (@haleksandrov)

    @khouya Thanks, you can also install the wp rollback plugin, and you can rollback the Yoast seo plugin version to 19.1 for anyone who is looking for another soltuion.

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

The topic ‘New PHP Notice after update’ is closed to new replies.