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

Geologist (Blockbase) conflicts with Yoast SEO in GB 11.8 RC 2 in single post view #17550

Closed
2 of 5 tasks
bph opened this issue Oct 24, 2021 · 2 comments
Closed
2 of 5 tasks

Comments

@bph
Copy link

bph commented Oct 24, 2021

  • I've read and understood the contribution guidelines.
  • I've searched for any related issues and avoided creating a duplicate issue.

Please give us a description of what happened.

After I created a post and publish it I ran into the error message (see below)

I am not certain if that needs to be fixed

The conflict also shows itself with the parent theme Blockbase.

It doesn't occur with the current Gutenberg plugin version 11.7.1
It also doesn't show when using TT1 Blocks, or Tove themes.
Video: https://recordit.co/eaT3lSetEY

Error Message

Fatal error: Uncaught ArgumentCountError: Too few arguments to function {closure}(), 1 passed in /app/public/wp-includes/class-wp-hook.php on line 305 and exactly 2 expected in /app/public/wp-includes/script-loader.php on line 2447

ArgumentCountError: Too few arguments to function {closure}(), 1 passed in /app/public/wp-includes/class-wp-hook.php on line 305 and exactly 2 expected in /app/public/wp-includes/script-loader.php on line 2447

1 0.0000 403304 {main}( ) .../index.php:0
2 0.0003 403576 require( '/app/public/wp-blog-header.php' ) .../index.php:17
3 0.4774 5493136 require_once( '/app/public/wp-includes/template-loader.php' ) .../wp-blog-header.php:19
4 0.4986 5784440 include( '/app/public/wp-content/plugins/gutenberg/lib/template-canvas.php' ) .../template-loader.php:106
5 0.5304 5942928 wp_head( ) .../template-canvas.php:17
6 0.5304 5942928 do_action( ) .../general-template.php:3015
7 0.5304 5943304 WP_Hook->do_action( ) .../plugin.php:470
8 0.5304 5943304 WP_Hook->apply_filters( ) .../class-wp-hook.php:327
9 0.5731 6313960 Yoast\WP\SEO\Integrations\Front_End_Integration->call_wpseo_head( ) .../class-wp-hook.php:303
10 0.5733 6313960 do_action( ) .../front-end-integration.php:291
11 0.5733 6314336 WP_Hook->do_action( ) .../plugin.php:470
12 0.5733 6314336 WP_Hook->apply_filters( ) .../class-wp-hook.php:327
13 0.5734 6315464 Yoast\WP\SEO\Integrations\Front_End_Integration->present_head( ) .../class-wp-hook.php:303
14 0.5821 6371312 Yoast\WP\SEO\Presenters\Open_Graph\Description_Presenter->present( ) .../front-end-integration.php:317
15 0.5821 6371312 Yoast\WP\SEO\Presenters\Open_Graph\Description_Presenter->get( ) .../abstract-indexable-tag-presenter.php:37
16 0.5821 6371312 Yoast\WP\SEO\Presentations\Indexable_Post_Type_Presentation->__get( ) .../description-presenter.php:40
17 0.5821 6371368 Yoast\WP\SEO\Presentations\Indexable_Post_Type_Presentation->generate_open_graph_description( ) .../abstract-presentation.php:64
18 0.5821 6371368 Yoast\WP\SEO\Helpers\Post_Helper->get_the_excerpt( ) .../indexable-post-type-presentation.php:196
19 0.5821 6371368 get_the_excerpt( ) .../post-helper.php:72
20 0.5821 6371816 apply_filters( ) .../post-template.php:429
21 0.5822 6372216 WP_Hook->apply_filters( ) .../plugin.php:189
22 0.5822 6373720 wp_trim_excerpt( ) .../class-wp-hook.php:303
23 0.5824 6373720 excerpt_remove_blocks( ) .../formatting.php:3820
24 0.5826 6393984 render_block( ) .../blocks.php:768
25 0.5827 6394552 WP_Block->render( ) .../blocks.php:868
26 0.5827 6394928 apply_filters( ) .../class-wp-block.php:244
27 0.5827 6395328 WP_Hook->apply_filters( ) .../plugin.php:189
28 0.5827 6396080 {closure:/app/public/wp-includes/script-loader.php:2447-2450}( ) .../class-wp-hook.php:305

Please describe what you expected to happen and why.

That I am able to see the single post, I just published

How can we reproduce this behavior?

  1. New site on WordPress 5.8.1
  2. Install Gutenberg 11.8 RC 2
  3. Install Yoast SEO from the repository (17.4)
  4. Add a post with a few paragraph blocks
  5. Publish post
  6. View post.

Technical info

  • If relevant, which editor is affected (or editors):
  • [x ] Gutenberg 11.8 RC2
  • Which browser is affected (or browsers):
  • [ x] Chrome 95.0.4638.54 (also happened with earlier version)

Used versions

  • WordPress version: 5.8.1

  • Yoast SEO version: 17.4

  • Gutenberg plugin version: 11.8 RC 2 - to be released Oct 27

  • Relevant plugins in case of a bug:
    no other plugins.

  • Tested with theme:
    TT1 Block and Tove

@Djennez
Copy link
Member

Djennez commented Oct 27, 2021

After some investigation, I am pretty certain this is a core bug. The add_filter on https://github.com/WordPress/WordPress/blob/b8e6a3c334d03b6b12bf1653375dda8cefb0d13e/wp-includes/script-loader.php#L2449-L2454 only gets passed one argument from WP_Hook. This happens because no number of arguments is defined and so it defaults to 1. I would think this would fail more often, but I assume this only shows up in this scenario because the logic that leads up to this add_filter is pretty specific.

Still not a 100% certain about this, because filters. I've asked our internal core team for some additional eyes on.

@Djennez
Copy link
Member

Djennez commented Oct 27, 2021

It's a confirmed issue in core, reported here. So this will see a fix upstream. As such, I will be closing this issue here.

@Djennez Djennez closed this as completed Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants