• Resolved cnequips

    (@cnequips)


    I have repeatedly deleted and installed yoastseo several times, but as long as I open the new product page of yoaStseo, the following error will be reported. If you close yoaStseo, it can be displayed normally. What should I do?

    Fatal error: Uncaught TypeError: Argument 1 passed to Yoast\WP\SEO\Generators\Breadcrumbs_Generator::Yoast\WP\SEO\Generators\{closure}() must be an instance of Yoast\WP\SEO\Models\Indexable, bool given in /home/customer/www/cnequips.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}(false) #1 /home/customer/www/cnequips.com/public_html/wp-content/plugins/wordpress-seo/src/generators/breadcrumbs-generator.php(168): array_map(Object(Closure), Array) #2 /home/customer/www/cnequips.com/public_html/wp-content/plugins/wordpress-seo/src/presentations/indexable-presentation.php(765): Yoast\WP\SEO\Generators\Breadcrumbs_Generator->generate(Object(Yoast\WP\SEO\Context\Meta_Tags_Context)) #3 /home/customer/www/cnequips.com/public_html/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php(64): Yoast\WP\SEO\Presentations\Indexable_Presentation->generate_ in /home/customer/www/cnequips.com/public_html/wp-content/plugins/wordpress-seo/src/generators/breadcrumbs-generator.php on line 141
    
    There has been a critical error on this website.
    
    Learn more about troubleshooting WordPress.

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

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Support Maybellyne

    (@maybellyne)

    Hello @cnequips

    I’m sorry about the fatal error you experienced.

    First, please set WP_DEBUG and WP_DEBUG_LOG to true, so the error isn’t visible to site visitors.

    // Enable WP_DEBUG mode
    define( 'WP_DEBUG', true );
    
    // Enable Debug logging to the /wp-content/debug.log file
    define( 'WP_DEBUG_LOG', true );

    Next, what PHP version are you using? A Site Health site info copy would be good for us to understand your site better. You can find this under WordPress > Tools > Site Health > Info (tab) > Copy site info button.

    Thread Starter cnequips

    (@cnequips)

    `
    ### wp-core ###

    version: 6.1.1
    site_language: en_US
    user_language: en_US
    timezone: +00:00
    permalink: /%postname%/
    https_status: true
    multisite: false
    user_registration: 0
    blog_public: 1
    default_comment_status: undefined
    environment_type: production
    user_count: 1
    dotorg_communication: true

    Thank you very much. I don’t know whether the above information is enough. If you need more information, I will reply you immediately.

    Plugin Support devnihil

    (@devnihil)

    @cnequips Thanks for your reply and for providing this information.

    Can you also please let us know what the PHP version you are using on your site is?

    You can check this in WordPress by performing the following steps:

      • In WordPress, go to Tools>Site Health
      • Click on the ‘Info’ tab
      • Expand the ‘Server’ area
      ‘PHP version’ displays your version information
    Thread Starter cnequips

    (@cnequips)

    Thank you for your reply. The following is my server information.

    Server architecture Linux 3.12.18-clouder0 x86_64
    Web server Apache
    PHP version 7.4.33 (Supports 64bit values)
    PHP SAPI apache2handler
    PHP max input variables 3000
    PHP time limit 120
    PHP memory limit 768M
    Max input time 120
    Upload max filesize 256M
    PHP post max size 256M
    cURL version 7.66.0 OpenSSL/1.1.1q-fips
    Is SUHOSIN installed? No
    Is the Imagick library available? No
    Are pretty permalinks supported? Yes
    .htaccess rules Custom rules have been added to your .htaccess file.

    Same error happens for php 8.0 as well.

    Here is my stack trace!

    
    
    [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

    Plugin Support Maybellyne

    (@maybellyne)

    Hello @cnequips

    Thanks for the feedback. I see that you’re on PHP version 7.4.33. Are you using either the wpseo_breadcrumb_links or wpseo_breadcrumb_single_link_info filters to customize your breadcrumbs output?

    Thread Starter cnequips

    (@cnequips)

    I checked my settings and did not see the breadcrumbs filter. My posts also use bread crumbs, but it works properly. All product pages report the above error.
    I don’t know whether the above information is useful to you, thank you!

    • This reply was modified 1 year, 8 months ago by cnequips.
    Plugin Support Suwash

    (@suascat_wp)

    @cnequips

    Can you also please confirm you’ve performed the SEO Data Optimization on your website by going to SEO > Tools?

    Thread Starter cnequips

    (@cnequips)

    Yes, I executed Optimize SEO Data. The following is the prompt result after execution:SEO data optimization complete

    Plugin Support Suwash

    (@suascat_wp)

    @cnequips

    We want to know if errors in the log file are still being written after completing optimization. If the errors continue to see, we request you perform a conflict check. Often, we see problems occur in combination with another plugin or theme. The fastest way to rule out any conflict is to deactivate all non-Yoast plugins and switch to a standard theme like Twenty Twenty.

    Please test this on your development or staging site if you have one. If not, we recommend using the Health Check & Troubleshooting plugin. This plugin has a troubleshooting mode, which does not affect normal visitors to your site.

    If you’re unfamiliar with checking for conflicts, we’d like to point you to a step-by-step guide that will walk you through the process: How to check for plugin conflicts

    If you feel uncomfortable doing this yourself or if this does not solve your issue, our Yoast SEO Premium plugin comes with one year of (technical) support.

    Plugin Support Maybellyne

    (@maybellyne)

    This thread was marked resolved due to a lack of activity, but you’re always welcome to re-open the topic. Please read this post before opening a new request.

    Thread Starter cnequips

    (@cnequips)

    Thank you, my problem has been solved.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Fatal error: Uncaught TypeError: Argument 1 passed to Yoast\WP\SEO\Generators’ is closed to new replies.