Skip to content

Conversation

@getdave
Copy link
Contributor

@getdave getdave commented Feb 13, 2024

What?

Fatal error: Uncaught ArgumentCountError: Too few arguments to function WP_REST_Global_Styles_Revisions_Controller::__construct(), 0

This is because the 6.5 class didn't pass the parent post type argument and the 6.4 class didn't define the property.

See https://wordpress.slack.com/archives/C02RQBWTW/p1707834984621719.

Why?

How?

Testing Instructions

  • run latest wordpress trunk.
  • check out Gutenberg trunk.
  • visit Site Editor
  • see errors
  • apply this PR
  • don't see errors

Note that it's possible WP Core trunk will have patched this already.

Testing Instructions for Keyboard

Screenshots or screencast

@getdave getdave requested a review from youknowriad February 13, 2024 15:07
@github-actions
Copy link

This pull request has changed or added PHP files. Please confirm whether these changes need to be synced to WordPress Core, and therefore featured in the next release of WordPress.

If so, it is recommended to create a new Trac ticket and submit a pull request to the WordPress Core Github repository soon after this pull request is merged.

If you're unsure, you can always ask for help in the #core-editor channel in WordPress Slack.

Thank you! ❤️

View changed files
❔ lib/compat/wordpress-6.4/class-gutenberg-rest-global-styles-revisions-controller-6-4.php
❔ lib/compat/wordpress-6.5/rest-api.php

@getdave getdave added the [Type] Bug An existing feature does not function as intended label Feb 13, 2024
@getdave getdave marked this pull request as ready for review February 13, 2024 16:01
@github-actions
Copy link

github-actions bot commented Feb 13, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @jonnynews.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Unlinked contributors: jonnynews.

Co-authored-by: getdave <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@getdave
Copy link
Contributor Author

getdave commented Feb 13, 2024

We might end up patching this in Core WordPress/wordpress-develop#6106

@jonnynews
Copy link
Contributor

@getdave I think this should be fixed in core. This fix works in core WordPress/wordpress-develop@95db1e9

@getdave
Copy link
Contributor Author

getdave commented Feb 13, 2024

That fix now looks to have been committed so I can close this one out as not required.

@getdave getdave closed this Feb 13, 2024
@jonnynews
Copy link
Contributor

That fix now looks to have been committed so I can close this one out as not required.

It was not committed. The global controller was reverted. That commit is from a PR.

@getdave
Copy link
Contributor Author

getdave commented Feb 13, 2024

PR referenced above

@johnbillion johnbillion deleted the fix/global-styles-rest-controller-construct branch February 10, 2025 16:50
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

Successfully merging this pull request may close these issues.

3 participants