• Resolved Peacecamper

    (@peacecamper)


    My webhost recently deactivated PHP 7.4 and upgraded to PHP 8.0 or 8.1 (to chose from).
    Since then I get the following error with Yoast SEO when it’s activated and I can’t access the plugin control in the backend, the dashboard main site and so on.

    Uncaught TypeError: array_map(): Argument #2 ($array) must be of type array, bool given in /is/htdocs/wp12367075_08C5KTZMZM/www/wp-content/plugins/wordpress-seo-premium/src/actions/indexation/indexable-post-type-archive-indexation-action.php:154
    Stack trace:
    #0 /is/htdocs/wp12367075_08C5KTZMZM/www/wp-content/plugins/wordpress-seo-premium/src/actions/indexation/indexable-post-type-archive-indexation-action.php(154): array_map(Object(Closure), false)
    #1 /is/htdocs/wp12367075_08C5KTZMZM/www/wp-content/plugins/wordpress-seo-premium/src/actions/indexation/indexable-post-type-archive-indexation-action.php(110): Yoast\WP\SEO\Actions\Indexation\Indexable_Post_Type_Archive_Indexation_Action->get_indexed_post_type_archives()
    #2 /is/htdocs/wp12367075_08C5KTZMZM/www/wp-content/plugins/wordpress-seo-premium/src/actions/indexation/indexable-post-type-archive-indexation-action.php(64): Yoast\WP\SEO\Actions\Indexation\Indexable_Post_Type_Archive_Indexation_Action->get_unindexed_post_type_archives(false)
    #3 /is/htdocs/wp12367075_08C5KTZMZM/www/wp-content/plugins/wordpress-seo-premium/src/integrations/admin/indexation-integration.php(246): Yoast\WP\SEO\Actions\Indexation\Indexable_Post_Type_Archive_Indexation_Action->get_total_unindexed()
    #4 /is/htdocs/wp12367075_08C5KTZMZM/www/wp-content/plugins/wordpress-seo-premium/src/integrations/admin/indexation-integration.php(132): Yoast\WP\SEO\Integrations\Admin\Indexation_Integration->get_total_unindexed()
    #5 /is/htdocs/wp12367075_08C5KTZMZM/www/wp-includes/class-wp-hook.php(308): Yoast\WP\SEO\Integrations\Admin\Indexation_Integration->enqueue_scripts('index.php')
    #6 /is/htdocs/wp12367075_08C5KTZMZM/www/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array)
    #7 /is/htdocs/wp12367075_08C5KTZMZM/www/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    #8 /is/htdocs/wp12367075_08C5KTZMZM/www/wp-admin/admin-header.php(118): do_action('admin_enqueue_s...', 'index.php')
    #9 /is/htdocs/wp12367075_08C5KTZMZM/www/wp-admin/index.php(137): require_once('/is/htdocs/wp12...')
    #10 {main}
      thrown
    • This topic was modified 1 year, 8 months ago by Peacecamper.
Viewing 3 replies - 1 through 3 (of 3 total)
  • PHP version: 8.0

    Got the same issue. Here is my stack trace:

    
    <pre><code>[04-Dec-2022 16:41:10 UTC] PHP Fatal error:  Uncaught TypeError: Yoast\WP\SEO\Generators\Breadcrumbs_Generator::Yoast\WP\SEO\Generators\{closure}(): Argument #1 ($ancestor) must be of type Yoast\WP\SEO\Models\Indexable, bool given in /home/example.com/public_html/wp-content/plugins/wordpress-seo/src/generators/breadcrumbs-generator.php:141
    Stack trace:
    #0 [internal function]: Yoast\WP\SEO\Generators\Breadcrumbs_Generator->Yoast\WP\SEO\Generators\{closure}()
    #1 /home/example.com/public_html/wp-content/plugins/wordpress-seo/src/generators/breadcrumbs-generator.php(168): array_map()
    #2 /home/example.com/public_html/wp-content/plugins/wordpress-seo/src/presentations/indexable-presentation.php(765): Yoast\WP\SEO\Generators\Breadcrumbs_Generator->generate()
    #3 /home/example.com/public_html/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php(64): Yoast\WP\SEO\Presentations\Indexable_Presentation->generate_breadcrumbs()
    #4 /home/example.com/public_html/wp-content/plugins/wordpress-seo/src/generators/schema/breadcrumb.php(37): Yoast\WP\SEO\Presentations\Abstract_Presentation->__get()
    #5 /home/example.com/public_html/wp-content/plugins/wordpress-seo/src/generators/schema-generator.php(129): Yoast\WP\SEO\Generators\Schema\Breadcrumb->generate()
    #6 /home/example.com/public_html/wp-content/plugins/wordpress-seo/src/generators/schema-generator.php(76): Yoast\WP\SEO\Generators\Schema_Generator->generate_graph()
    #7 /home/example.com/public_html/wp-content/plugins/wordpress-seo/src/presentations/indexable-presentation.php(754): Yoast\WP\SEO\Generators\Schema_Generator->generate()
    #8 /home/example.com/public_html/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php(64): Yoast\WP\SEO\Presentations\Indexable_Presentation->generate_schema()
    #9 /home/example.com/public_html/wp-content/plugins/wordpress-seo/src/presenters/schema-presenter.php(60): Yoast\WP\SEO\Presentations\Abstract_Presentation->__get()
    #10 /home/example.com/public_html/wp-content/plugins/wordpress-seo/src/presenters/schema-presenter.php(44): Yoast\WP\SEO\Presenters\Schema_Presenter->get()
    #11 /home/example.com/public_html/wp-content/plugins/wordpress-seo/src/integrations/front-end-integration.php(326): Yoast\WP\SEO\Presenters\Schema_Presenter->present()
    #12 /home/example.com/public_html/wp-includes/class-wp-hook.php(308): Yoast\WP\SEO\Integrations\Front_End_Integration->present_head()
    #13 /home/example.com/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
    #14 /home/example.com/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
    #15 /home/example.com/public_html/wp-content/plugins/wordpress-seo/src/integrations/front-end-integration.php(300): do_action()
    #16 /home/example.com/public_html/wp-includes/class-wp-hook.php(308): Yoast\WP\SEO\Integrations\Front_End_Integration->call_wpseo_head()
    #17 /home/example.com/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
    #18 /home/example.com/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
    #19 /home/example.com/public_html/wp-includes/general-template.php(3043): do_action()
    #20 /home/example.com/public_html/wp-content/themes/short-news-pro/header.php(22): wp_head()
    #21 /home/example.com/public_html/wp-includes/template.php(783): require_once('...')
    #22 /home/example.com/public_html/wp-includes/template.php(718): load_template()
    #23 /home/example.com/public_html/wp-includes/general-template.php(48): locate_template()
    #24 /home/example.com/public_html/wp-content/plugins/sport-events/inc/templates/template-wse-single.php(10): get_header()
    #25 /home/example.com/public_html/wp-includes/template-loader.php(106): include('...')
    #26 /home/example.com/public_html/wp-blog-header.php(19): require_once('...')
    #27 /home/example.com/public_html/index.php(17): require('...')
    #28 {main}
      thrown in /home/example.com/public_html/wp-content/plugins/wordpress-seo/src/generators/breadcrumbs-generator.php on line 141
    • This reply was modified 1 year, 8 months ago by prionkor.

    When I rolled back to 19.10 the problem is gone. So that may narrow it down for the yoast team.

    Plugin Support Maybellyne

    (@maybellyne)

    Hello @peacecamper,

    I’m sorry about the critical error. However, this forum is reserved for supporting the free version of Yoast SEO. Your site is using a premium plugin, so this thread has been marked as resolved per the forum guidelines.

    Please contact our support team for assistance if you have an active premium subscription. How can I get premium support?

    If you do not have an active premium subscription, you can either purchase a subscription or downgrade to the free version.

    @prionkor We are sorry you’re having a similar issue. Please open a new request. That way, it’s easier to track issues and provide assistance. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Uncaught TypeError’ is closed to new replies.