• Some queries will error out when attempting to access data. Here’s one error message that shows immediately on fresh activation of Yoast and this plugin:

    “debugMessage”: “Undefined array key \”bctitle-archive-wpseo\””,

    If I add an isset() check for that property, it then fails on:

    $userID = $all['company_or_person_user_id'];
    $user = get_userdata($userID);

    This is because the default value for ‘company_or_person_user_id’ is (seemingly) false, which makes $user false (and later you attempt to access properties off of it).

    “Attempt to read property \”user_nicename\” on bool”

    Let me know what you think.

Viewing 1 replies (of 1 total)
  • Thread Starter Kevin Batdorf

    (@kbat82)

    Also, if you set “Knowledge Graph & Schema.org” in Yoast settings to an organization it also fails as the code in this plugin is expecting a specific user ID?

    And it seems if I set a person, then go back and set an organization, the query succeeds, but the person setting is persisted. i.e. it seems you’re required to set a person at least once.

    Thanks

Viewing 1 replies (of 1 total)
  • The topic ‘Errors on missing properties’ is closed to new replies.