Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
franmastromarino opened this issue Oct 23, 2020 · 8 comments
Labels
[Type] Bug An existing feature does not function as intended

Comments

@franmastromarino
Copy link

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

@mkaz mkaz added the [Type] Bug An existing feature does not function as intended label Oct 23, 2020
@mkaz
Copy link
Member

mkaz commented Oct 23, 2020

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}

@mkaz
Copy link
Member

mkaz commented Oct 23, 2020

@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.

@mkaz
Copy link
Member

mkaz commented Oct 23, 2020

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

@cabrerahector
Copy link

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.

@youknowriad
Copy link
Contributor

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

@oandregal
Copy link
Member

oandregal commented Oct 26, 2020

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.

@oandregal
Copy link
Member

oandregal commented Oct 26, 2020

This is fixed in 9.2.2. Thanks for reporting!

@franmastromarino
Copy link
Author

thank you guys!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

5 participants