• Resolved Mark Howells-Mead

    (@markhowellsmead)


    Notice: Trying to get property of non-object in …/public_html/wp-content/plugins/wordpress-seo/frontend/schema/class-schema-utils.php on line 26.

    Through debugging the code, the issue seems to arise when the value of $user_id passed in to the function get_user_schema_id is zero. This results in $user = get_userdata($user_id); returning false, and a PHP Notice that $user is a non-object.

    No other plugins installed and Twenty Nineteen active.

Viewing 6 replies - 1 through 6 (of 6 total)
  • MariusG

    (@marius_codeinwp)

    Hi Mark,

    Thank you for reporting this issue. We have not yet been able to replicate this issue on our side. To do so, please answer a few questions:

    1) Are you getting this issue only on specific pages, or on the whole website?
    2) Can you confirm you are using the latest version of Yoast SEO (12.1) and WordPress (5.2.3)?
    3) Are author archives currently enabled or not at SEO → Search Appearance → Archives?

    We are looking forward to your reply.

    An identical issue here.

    I have the latest versions of both WordPress & Yoast. I even tried to completely delete wordpress SEO plugin but the error still appears on every page.

    Tried to deactivate all plugins and it was gone. When turned on Yoast plugin error appeared again.

    Had the same message as well.

    A fix for me:
    Yoast / Search Appearance / General / Knowledge Graph & Schema.org

    Make sure this is filled in correctly and save. This worked for me.

    Plugin Support Jerlyn

    (@jerparx)

    It seems that there’s an issue while trying to retrieve the ID of a user that the plugin wants to output in the schema data of the page. Can you please try the suggestions below and let us know if the problem resolves?
    Go to SEO > Search Appearance > General and select a WordPress user in the Personal Info Name dropdown.
    OR
    Go to SEO > Search Appearance > General and change what your site represents from “Person” to “Organization”.

    @bernasbliu If the issue is not resolved by the suggested steps above, please start a new thread so we can properly track the issue.

    Plugin Support amboutwe

    (@amboutwe)

    This thread has been marked as resolved due to lack of activity.

    You’re always welcome to re-open this topic. Please read this post before opening a new request.

    Thanks for understanding!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Notice: Trying to get property of non-object in class-schema-utils.php’ is closed to new replies.