Skip to content

Fatal error on front end: Call to undefined method WP_Theme_JSON::get_custom_css()  #48944

@iandunn

Description

@iandunn

Description

Call to undefined method WP_Theme_JSON::get_custom_css() in wp-content/plugins/gutenberg/lib/compat/wordpress-6.2/get-global-styles-and-settings.php:84

$stylesheet = $tree->get_custom_css();

That doesn't exist in https://github.com/WordPress/gutenberg/blob/0b8f0d9c3201dc502d22c3bf8ab478ce7722755d/lib/class-wp-theme-json-resolver-gutenberg.php

Step-by-step reproduction instructions

  1. Install WP 6.1 branch from https://core.svn.wordpress.org/branches/6.1 @ r55024 (the latest as of this report)
  2. Install Gutenberg 15.3.0 from the plugin repo
  3. Activate TwentyTwentyTwo
  4. Visit the front end

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions