Make WordPress Core

Opened 5 months ago

Closed 5 months ago

Last modified 5 months ago

#63560 closed defect (bug) (invalid)

Fatal error on my theme

Reported by: latablerouge's profile latablerouge Owned by:
Milestone: Priority: normal
Severity: major Version: 6.8
Component: Themes Keywords:
Focuses: Cc:

Description

Hello,

I received an email about a fatal error for my theme.
I did multiple tests on my local and on the playground, and I didn't find any case which lead to a fatal error.
Playground link : http://playground.wordpress.net/?php=8.1&networking=yes&theme=simppple
Theme link : https://wordpress.org/themes/simppple/

Here's the message I got :
"Your theme simppple has been delisted due to a fatal error on wp-themes.com, which currently runs PHP 8.1.

The error is:

E_ERROR: Uncaught TypeError: Simppple\ThemeCustomization\remove_default_values_from_CSS_variables(): Argument #1 ($theme_json) must be of type WP_Theme_JSON_Data, WP_Theme_JSON_Data_Gutenberg given, called in /wp/wp-includes/class-wp-hook.php on line 324 and defined in /wp-content/themes/simppple/inc/theme-customization/theme-remove-default-settings.php:24

Although the above fatal references wp-includes, we believe the error is caused by the theme itself, rather than core WordPress."

I don't know what to do since I cannot reproduce the problem..

Change History (1)

#1 @dd32
5 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

This has been resolved via an email to themes@…, and https://themes.trac.wordpress.org/changeset/275578

The theme in question was requiring a WP_Theme_JSON_Data object in a filter, and not expecting a WP_Theme_JSON_Data_Gutenberg object from Gutenberg hooking to that filter.

Last edited 5 months ago by dd32 (previous) (diff)
Note: See TracTickets for help on using tickets.