• Resolved giuseppectmobi

    (@giuseppectmobi)


    Hi,

    with the latest update we receive a lot of fatal error:

    PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function Yoast\WP\SEO\Helpers\Language_Helper::__construct(), 0 passed in /var/www/html/wp-content/plugins/wordpress-seo/src/generated/container.php on line 2031 and exactly 1 expected in /var/www/html/wp-content/plugins/wordpress-seo/src/helpers/language-helper.php:19
    Stack trace:
    #0 /var/www/html/wp-content/plugins/wordpress-seo/src/generated/container.php(2031): Yoast\WP\SEO\Helpers\Language_Helper->__construct()
    #1 /var/www/html/wp-content/plugins/wordpress-seo/vendor_prefixed/symfony/dependency-injection/Container.php(271): Yoast\WP\SEO\Generated\Cached_Container->getLanguageHelperService()
    #2 /var/www/html/wp-content/plugins/wordpress-seo/src/surfaces/helpers-surface.php(108): YoastSEO_Vendor\Symfony\Component\DependencyInjection\Container->get(‘Yoast\\WP\\SEO\\He…’)
    #3 /var/www/html/wp-content/plugins/wordpress-seo/admin/class-admin-asset-manager.php(319): Yoast\WP\SEO\Surfaces\Helpers_Surface->__get(‘Language’)
    #4 /var/www/html/wp-content/plugins/wor in /var/www/html/wp-content/plugins/wordpress-seo/src/helpers/language-helper.php on line 19

    We use php 7.4

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

    (@maybellyne)

    Hello @giuseppectmobi,

    We are sorry about the fatal error. 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 do not feel comfortable to do this yourself or if this does not solve your issue, our Yoast SEO Premium plugin comes with one year of (technical) support.

    Hi @giuseppectmobi,

    I just noticed that the line item mentioned in the stack trace is 2031. In 17.1 that’s changed to 2043 so my guess would be that clearing your OPcache would fix the issue (or reinstalling the plugin). Can you try that before diving into a conflict check?

    Thread Starter giuseppectmobi

    (@giuseppectmobi)

    Hi @benvaassen ,

    thank you, it was an opcache issue.

    Hi @benvaassen, I have been receiving similar fatal errors whenever there is a Yoast update for the past few updates (several months), on several of my websites.

    Would re-installing the plugin also fix this issue? (see below) Thank you!

    =============
    An error of type E_ERROR was caused in line 35 of the file /nas/content/live/prodfeldco/wp-content/plugins/wordpress-seo/src/helpers/language-helper.php. Error message: Uncaught ArgumentCountError: Too few arguments to function Yoast\WP\SEO\Helpers\Language_Helper::__construct(), 1 passed in /nas/content/live/prodfeldco/wp-content/plugins/wordpress-seo/src/generated/container.php on line 2064 and exactly 2 expected in /nas/content/live/prodfeldco/wp-content/plugins/wordpress-seo/src/helpers/language-helper.php:35
    Stack trace:
    #0 /nas/content/live/prodfeldco/wp-content/plugins/wordpress-seo/src/generated/container.php(2064): Yoast\WP\SEO\Helpers\Language_Helper->__construct(Object(Yoast\WP\SEO\Conditionals\Japanese_Support_Conditional))
    #1 /nas/content/live/prodfeldco/wp-content/plugins/wordpress-seo/vendor_prefixed/symfony/dependency-injection/Container.php(271): Yoast\WP\SEO\Generated\Cached_Container->getLanguageHelperService()
    #2 /nas/content/live/prodfeldco/wp-content/plugins/wordpress-seo/src/surfaces/helpers-surface.php(108): YoastSEO_Vendor\Symfony\Component\DependencyInjection\Container->get(‘Yoast\\WP\\SEO\\He…’)
    #3 /nas/content/live/prodfeldco/wp-content/plugins/

    • This reply was modified 3 years, 4 months ago by 1bmckots.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Fatal error with yoast 17.1’ is closed to new replies.