• Resolved striffly

    (@striffly)


    Hi,

    When I go inside (/wp/wp-admin/edit.php?post_type=acf-field-group), I got the following error :

    Trying to get property ‘object_id’ of non-object

    # wordpress-seo/src/integrations/admin/admin-columns-cache-integration.php:112
    
    foreach ( $indexables as $indexable ) {
        $this->indexable_cache[ $indexable->object_id ] = $indexable;
    }

    $indexables returns an array of two empty items.

    A temporary fix :

    foreach ( $indexables as $indexable ) {
        if (empty($indexable)) continue;
        $this->indexable_cache[ $indexable->object_id ] = $indexable;
    }

    Another fix I found is to rollback to 19.10 or less, then go back to 20.0.

    However, I don’t know if these “hotfixs” has other repercussions…

    Website infos :

    • WordPress 6.1.1
    • Yoast SEO 20.0 / 20.1-RC-7
    • PHP 7.4

    Thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hey @striffly,

    Thank you so much for reaching out to us and providing so much detail. I see that you’ve also posted it on our GitHub repo so let’s see how the developers respond to this – as we are not aware of possible other repercussions. Thank you.

    Plugin Support Maybellyne

    (@maybellyne)

    .

    • This reply was modified 2 years, 1 month ago by Maybellyne.

    @striffly I just encountered this issue myself. There is something wrong with the indexables table of Yoast and you can fix it by installing the Yoast Test Helper plugin.

    You can read some more on this here: https://yoast.com/help/how-to-reset-yoast-indexables/

    This is not a solid solution for the underlying issue of the messed up indexables table but at least it can help you move on while Yoast is working on this issue.

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