You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
gutenberg 9.2.1 Uncaught ArgumentCountError: Too few arguments to function {closure}(), #26420
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
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}
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.
Activity
mkaz commentedon 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
mkaz commentedon 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 commentedon 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 commentedon Oct 24, 2020
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 commentedon Oct 26, 2020
I think this is now fixed in this ticket. https://core.trac.wordpress.org/ticket/51606
oandregal commentedon 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 commentedon Oct 26, 2020
This is fixed in 9.2.2. Thanks for reporting!
franmastromarino commentedon Oct 26, 2020
thank you guys!