• Resolved rtbpcs

    (@rtbpcs)


    Good Morning,
    I keep having a fatal error across my staging site that’s tied to an invalid field within the latest Yoast plugin. I’m not quite sure how I could fix this issue. Would you mind please giving me a few suggestions as to how I can target the issue and remedy it? Thank you!

    WP Version: 5.6.1
    Theme: Astra (3.0.2) with Elementor (latest version)
    Yoast SEO: 15.8 PHP version 7.3.27

    The error I receive:

    An error of type E_ERROR was caused in line 340 of the file /home/customer/www/staging2.bpcs.com/public_html/wp-content/plugins/wordpress-seo/src/builders/indexable-hierarchy-builder.php. Error message: Uncaught TypeError: Argument 1 passed to Yoast\WP\SEO\Builders\Indexable_Hierarchy_Builder::is_invalid_ancestor() must be an instance of Yoast\WP\SEO\Models\Indexable, bool given, called in /home/customer/www/staging2.bpcs.com/public_html/wp-content/plugins/wordpress-seo/src/builders/indexable-hierarchy-builder.php on line 176 and defined in /home/customer/www/staging2.bpcs.com/public_html/wp-content/plugins/wordpress-seo/src/builders/indexable-hierarchy-builder.php:340
    Stack trace:
    #0 /home/customer/www/staging2.bpcs.com/public_html/wp-content/plugins/wordpress-seo/src/builders/indexable-hierarchy-builder.php(176): Yoast\WP\SEO\Builders\Indexable_Hierarchy_Builder->is_invalid_ancestor(false, NULL, Array)
    #1 /home/customer/www/staging2.bpcs.com/public_html/wp-content/plugins/wordpress-seo/src/builders/indexable-hierarchy-builder.php(112): Yoast\WP\SEO\Builders\Indexable_Hierarchy_Builder->add_ancestors_for_post(NULL, 7527, Array)
    #2 /home/customer/www/staging2.bpcs.com/public_html/wp-content/plugins/wordpress

    Thank you for your help!

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @rtbpcs,

    Sorry to hear about the error. Since this error mentions the indexables tables, please try the following steps to reindex the SEO data on your site or a staging site with Yoast SEO 15.8:

    1. Install and activate the Yoast Test Helper plugin
    2. Go to Tools -> Yoast Test
    3. Click the “Reset indexables and migrations” button
    4. Go to SEO -> Tools and under “Optimize SEO Data” click the “Start SEO data optimization” button.

    For sites with more than 10,000 posts, we’d advise using the WP CLI command to do the indexation on the server instead of going to SEO > Tools. You can read more about this here: WP CLI – Reindex Indexables command

    Does the error still appear?

    Thread Starter rtbpcs

    (@rtbpcs)

    Hi @priscillamc

    Thank you so much for your response. The Yoast Test Helper was exactly what I needed to troubleshoot the error, which was caused by me migrating a page and creating a new page with the exact same nomenclature in its place.

    I appreciate your help!

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

The topic ‘Invalid_Ancestor() Error 500 Message’ is closed to new replies.