Support » Plugin: Yoast SEO » TypeError in wp-admin (and frontend)

  • Resolved alduinwf

    (@alduinwf)


    Hi,

    trying to fiddle around on my local installation (which is a clone of the live site) – only exception: Clone is running PHP 8 because why not while live is on 7.4.

    When I go to wp-admin, list all posts, I get this wonderful error:

    TypeError: Yoast\WP\SEO\Builders\Indexable_Hierarchy_Builder::build(): Argument #1 ($indexable) must be of type Yoast\WP\SEO\Models\Indexable, bool given, called in {path}/wp-content/plugins/wordpress-seo/src/integrations/watchers/indexable-ancestor-watcher.php on line 197 in {path}/wp-content/plugins/wordpress-seo/src/builders/indexable-hierarchy-builder.php on line 102

    And sometimes this:
    Fatal error: Uncaught TypeError: Yoast\WP\SEO\Builders\Indexable_Hierarchy_Builder::build(): Argument #1 ($indexable) must be of type Yoast\WP\SEO\Models\Indexable, bool given, called in {path}/wp-content/plugins/wordpress-seo/src/integrations/watchers/indexable-ancestor-watcher.php on line 197 and defined in {path}/wp-content/plugins/wordpress-seo/src/builders/indexable-hierarchy-builder.php on line 102

    Or:
    Warning: Attempt to read property "post_author" on null in {path}/wp-content/plugins/wordpress-seo/src/integrations/watchers/indexable-post-watcher.php on line 251

    And when I try to access a post (not all, thought, not sure what the meta is here), I get this nice error:
    Error: Xdebug has detected a possible infinite loop, and aborted your script with a stack depth of '256' frames in {path}/wp-includes/plugin.php on line 949

    Together with a very long, and I mean extremely long, Call Stack.

    I could not yet narrow it down, but if I disable Yoast, all errors are gone.

    It is almost like it is trying to do some housekeeping while trying to display a post (or list a post) because if I reload often enough, the error goes away too and only comes back when I try to see another page (like page 2 in wp-admin).

    I’ve also tried a couple of things. Like I registered some CPT myself, but I undid all of my custom code – same result. ACF is also innocent. Please help?

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support suascat_wp

    (@suascat_wp)

    @alduinwf

    We’re sorry to hear you are experiencing this error. To resolve this, can you please try the following?:

    1. Install & activate the Yoast Test Helper plugin
    2. Go to Tools -> Yoast Test
    3. Hit the “Reset Indexables & Migrations” button
    4. Under SEO → Tools, click the “Start SEO Data Optimization” button.

    Are you still getting errors?

    If the issue remains:

    1. Can you confirm you are using the most recent Yoast SEO, v17.6?

    2. Are all your non-Yoast plugins and themes also updated?

    3. Can you confirm you are using WordPress 5.8.2? You can check by clicking on the W in the top left and selecting About. If you need to update, please check with your host provider. Please know that if you are using an older version of WordPress Core you may experience unexpected behavior with Yoast. This guide explains more: https://yoast.com/why-we-dont-support-old-wordpress-versions/.

    We look forward to hearing from you.`

    Thread Starter alduinwf

    (@alduinwf)

    Hello,

    thank you for your reply 🙂

    Yes, the site is running WordPress 5.8.2 and Yoast is 17.6. Every plugin is up to date and so is the theme.

    I’ve tried your steps to resolve the issue. And it seems to have worked.

    May I ask how this could break in the first place?

    Plugin Support suascat_wp

    (@suascat_wp)

    @alduinwf

    We’re happy to hear this pointed you in the right direction and the issue seems to have been resolved. Thank you for letting us know.

    Indeed, resetting indexables via Yoast Test Helper would help ensure and repair any flaws that might exist with SEO information at the database level and so treats Fatal errors that did exist in setup.

    Plugin Support devnihil

    (@devnihil)

    We are going ahead and marking this issue as resolved due to inactivity. If you require any further assistance please create a new issue.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘TypeError in wp-admin (and frontend)’ is closed to new replies.