Support » Plugin: Yoast SEO » Upgrading to PHP 8.1 breaks my site because of Yoast SEO

  • Resolved beamkiller

    (@beamkiller)


    Hi,

    After updating to PHP 8.1 I got a Fatal Error:

    PHP Fatal error:  Uncaught ValueError: Unknown format specifier " " in /xxx/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox.php:204
    Stack trace:
    #0 /xxx/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox.php(204): sprintf('Az oldalra muta...', '<a href="https:...', '<span class="sc...')
    #1 /xxx/wp-includes/class-wp-hook.php(324): WPSEO_Metabox::translate_meta_boxes('')
    #2 /xxx/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
    #3 /xxx/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    #4 /xxx/wp-admin/admin.php(175): do_action('admin_init')
    #5 /xxx/wp-admin/edit.php(10): require_once('/home/www/clien...')
    #6 {main}
      thrown in /xxx/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox.php on line 204

    Is Yoast compatible with PHP 8.1? If yes why I got this error and how can I solve it?

    Thanks.

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

    (@maybellyne)

    Hello @beamkiller,

    I’m sorry about the fatal error you encountered after updating to PHP 8.1. Is yours a multilingual site using WPML?

    Thread Starter beamkiller

    (@beamkiller)

    Hi,

    Thanks for suggestion. There is no WPML.

    But based on this input I managed to find the error.

    There were wrong translations in Loco Translate where the variable string for PHP had spaces in it.

    For example: %1$s
    Was like this: % 1 $ s

    Thanks.

    • This reply was modified 2 months, 3 weeks ago by beamkiller.
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.