Skip to content

gutenberg 9.2.1 Uncaught ArgumentCountError: Too few arguments to function {closure}(), #26420

Closed

Description

@franmastromarino

Hello guys

I start receiving this error in the logs after latest update

Describe the bug
[23-Oct-2020 13:24:09 UTC] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function {closure}(), 2 passed in C:\wamp64\www\test\wp-includes\class-wp-block-type.php on line 186 and exactly 3 expected in C:\wamp64\www\test\wp-content\plugins\gutenberg\lib\compat.php:536
Stack trace:
#0 C:\wamp64\www\test\wp-includes\class-wp-block-type.php(186): {closure}(Array, '')
#1 C:\wamp64\www\test\wp-content\plugins\gutenberg\lib\widget-preview-template.php(37): WP_Block_Type->render(Array)
#2 C:\wamp64\www\test\wp-content\plugins\gutenberg\lib\widgets.php(281): require_once('C:\wamp64\www\w...')
#3 C:\wamp64\www\test\wp-includes\class-wp-hook.php(287): gutenberg_load_widget_preview_if_requested('')
#4 C:\wamp64\www\test\wp-includes\class-wp-hook.php(311): WP_Hook->apply_filters('', Array)
#5 C:\wamp64\www\test\wp-includes\plugin.php(478): WP_Hook->do_action(Array)
#6 C:\wamp64\www\test\wp-admin\admin.php(237): do_action('load-appearance...')
#7 C:\wamp64\www\test\wp-admin\themes.php(10): require_once('C:\wamp64 in C:\wamp64\www\test\wp-content\plugins\gutenberg\lib\compat.php on line 536

To reproduce
Steps to reproduce the behavior:

  1. Go to http://localhost/test/wp-admin/themes.php?page=gutenberg-widgets
  2. Click on Widget Preview

Screenshotshttps://snipboard.io/4FnKtx.jpg

Activity

  1. added
    [Type] Bug
    on Oct 23, 2020
  2. mkaz commented on Oct 23, 2020

    @mkaz
    Member

    Likewise, I received a WordPress health check Your Site is Experiencing a Technical Issue notice, running Gutenberg plugin 9.2.1 on WP 5.5.1 with Twenty Twenty-One theme

    Error Details
    =============
    An error of type E_ERROR was caused in line 536 of the file /srv/htdocs/wp-content/plugins/gutenberg/lib/compat.php. Error message: Uncaught ArgumentCountError: Too few arguments to function {closure}(), 2 passed in /wordpress/core/5.5.1/wp-includes/class-wp-block-type.php on line 186 and exactly 3 expected in /srv/htdocs/wp-content/plugins/gutenberg/lib/compat.php:536
    Stack trace:
    #0 /wordpress/core/5.5.1/wp-includes/class-wp-block-type.php(186): {closure}(Array, '')
    #1 /srv/htdocs/wp-content/plugins/gutenberg/lib/widget-preview-template.php(37): WP_Block_Type->render(Array)
    #2 /srv/htdocs/wp-content/plugins/gutenberg/lib/widgets.php(281): require_once('/srv/htdocs/wp-...')
    #3 /wordpress/core/5.5.1/wp-includes/class-wp-hook.php(287): gutenberg_load_widget_preview_if_requested('')
    #4 /wordpress/core/5.5.1/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters('', Array)
    #5 /wordpress/core/5.5.1/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
    #6 /wordpress/core/5.5.1/wp-admin/admin.php(237): do_action('load-appearance...')
    #7 /wordpress/core/5.5.1/wp-admin/themes.php(10): require_once('/wordpress/core...')
    #8 {main}
    
  3. mkaz commented on Oct 23, 2020

    @mkaz
    Member

    @nosolosw I think this might be related to #26356

    It is not caused by that PR, since this bug is in the version prior to your change, but it involves much of the same files and functions.

  4. mkaz commented on Oct 23, 2020

    @mkaz
    Member

    Thanks @sirreal for the pointer, it looks like this will be closed in #26417 and the matching core patch at WordPress/wordpress-develop#640

  5. cabrerahector commented on Oct 24, 2020

    @cabrerahector

    Hey guys, not sure if this helps but I got this exact same error after adding a non-core widget (WordPress Popular Posts) to a sidebar in the new Widgets screen following the testing flow mentioned here: Call for Testing the Widgets Screen in Gutenberg 9.1.

  6. youknowriad commented on Oct 26, 2020

    @youknowriad
    Contributor

    I think this is now fixed in this ticket. https://core.trac.wordpress.org/ticket/51606

  7. oandregal commented on Oct 26, 2020

    @oandregal
    Member

    I could repro this with 5.5.1 and Gutenberg 9.2.1. It's different from the issue we saw with beta 1 and it's fixed by #26417 I think we need a patch release to fix this one.

  8. oandregal commented on Oct 26, 2020

    @oandregal
    Member

    This is fixed in 9.2.2. Thanks for reporting!

  9. franmastromarino commented on Oct 26, 2020

    @franmastromarino
    Author

    thank you guys!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Type] Bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions